1
0
Fork 0
mirror of synced 2024-11-26 09:15:34 -05:00

[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.
This commit is contained in:
Eric Nielsen 2018-06-16 21:49:20 -05:00
parent 4b0a6f9c7c
commit 903954985f

View file

@ -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