diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index f9877d0..5ba4600 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -17,14 +17,6 @@ if (( terminfo[colors] >= 8 )); then else export LS_COLORS='di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43' fi - - alias ls='ls --group-directories-first --color=auto' - alias lx='ll -X' # long format, sort by extension (GNU only) - - # Always wear a condom (GNU only) - alias chmod='chmod --preserve-root -v' - alias chown='chown --preserve-root -v' - else # BSD @@ -44,9 +36,7 @@ if (( terminfo[colors] >= 8 )); then (( ! ${+GREP_COLOR} )) && export GREP_COLOR='37;45' #BSD (( ! ${+GREP_COLORS} )) && export GREP_COLORS="mt=${GREP_COLOR}" #GNU if [[ ${OSTYPE} == openbsd* ]]; then - if (( ${+commands[ggrep]} )); then - alias grep='ggrep --color=auto' - fi + (( ${+commands[ggrep]} )) && alias grep='ggrep --color=auto' else alias grep='grep --color=auto' fi @@ -64,6 +54,21 @@ if (( terminfo[colors] >= 8 )); then fi +# +# GNU only +# + +if (( ${+commands[dircolors]} )); then + + alias ls='ls --group-directories-first --color=auto' + alias lx='ll -X' # long format, sort by extension + + # Always wear a condom + alias chmod='chmod --preserve-root -v' + alias chown='chown --preserve-root -v' +fi + + # # ls Aliases #