diff options
-rw-r--r-- | .config/zsh/.zshrc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index dc29d5a..bc63b3b 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -62,14 +62,25 @@ zle -N zle-line-finish # colors in various core utils alias diff='diff --color' -alias ls='ls --color=auto' export LESS='-R' + grep_opts="--color=auto --exclude-dir=.git" alias grep="grep $grep_opts" alias egrep="egrep $grep_opts" alias fgrep="fgrep $grep_opts" unset grep_opts +# perhaps time to switch to exa +if ls --color 1>/dev/null 2>&1; then + # gnu ls + alias ls='ls --color=auto' + alias ll='ls -l --almost-all --no-group --human-readable' +else + # bsd/mac ls + export CLICOLOR='1' + alias ll='ls -hoA' +fi + # dots go up alias -g ...='../..' alias -g ....='../../..' @@ -78,7 +89,6 @@ alias -g .....='../../../..' # aliases alias cls=clear alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' -alias ll='ls -l --almost-all --no-group --human-readable' alias mkdir='mkdir -p' if command -v gpg2 &> /dev/null; then |