From 903954985f28fae0fbfce51d704446fd02c0ff0c Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Sat, 16 Jun 2018 21:49:20 -0500 Subject: [PATCH] [utility] Move GNU-only code down so `lx` is defined after the general `ls` aliases, and also so we keep the "condom" aliases were they were before commit 0dfce9e8. --- modules/utility/init.zsh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index d8b3210..96e7692 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -56,20 +56,6 @@ if (( terminfo[colors] >= 8 )); then fi -# -# GNU only -# - -if (( ${+commands[dircolors]} )); then - - 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 # @@ -107,6 +93,20 @@ alias df='df -h' alias du='du -h' +# +# GNU only +# + +if (( ${+commands[dircolors]} )); then + + 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 + + # not aliasing rm -i, but if safe-rm is available, use condom. # if safe-rmdir is available, the OS is suse which has its own terrible 'safe-rm' which is not what we want if (( ${+commands[safe-rm]} && ! ${+commands[safe-rmdir]} )); then