ls colors

This commit is contained in:
2026-01-29 21:22:28 +01:00
parent 64b9cb0e55
commit 23f8866dff
2 changed files with 25 additions and 0 deletions

4
.vimrc
View File

@@ -18,6 +18,10 @@ set hidden " switch buffers without saving
set ignorecase smartcase " smart case search
set scrolloff=8 " keep 8 lines visible above/below cursor
set undofile " persistent undo across sessions
set undodir=~/.vim/undo//
set directory=~/.vim/swap//
set backupdir=~/.vim/backup//
set nobackup
set mouse=a " mouse support

21
.zshrc
View File

@@ -120,6 +120,14 @@ if (( $+commands[fzf] )); then
export FZF_DEFAULT_OPTS='--height 40% --reverse'
fi
# ls defaults
if (( $+commands[dircolors] )); then
[[ -z "$LS_COLORS" ]] && eval "$(dircolors --sh)"
alias ls='ls --group-directories-first --color=auto'
else
alias ls='ls -F'
fi
# aliases: git
alias g="git"
alias a="git add --all :/"
@@ -151,6 +159,19 @@ function y() {
rm -f -- "$tmp"
}
# functions
function mkcd {
: "${1:?where?}"
[[ -e $1 ]] && { echo "file exists"; return 1 }
mkdir -p $1 && cd $1
}
function cdtmp {
local dir="${HOME}/tmp/auto_$(date +%Y_%m_%d_%H_%M_%S)"
[[ -n "$1" ]] && dir="${dir}_$1"
mkcd "$dir"
}
# aliases: misc
alias zshreload="exec zsh"
alias -g LATEST='*(om[1])' # glob: most recently modified