diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index caa0ec8d41..eeaa00dda7 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -118,13 +118,17 @@ alias ll='ls -lh' # Lists human readable sizes. alias lr='ll -R' # Lists human readable sizes, recursively. alias la='ll -A' # Lists human readable sizes, hidden files. alias lm='la | "$PAGER"' # Lists human readable sizes, hidden files through pager. -alias lx='ll -XB' # Lists sorted by extension (GNU only). alias lk='ll -Sr' # Lists sorted by size, largest last. alias lt='ll -tr' # Lists sorted by date, most recent last. alias lc='lt -c' # Lists sorted by date, most recent last, shows change time. alias lu='lt -u' # Lists sorted by date, most recent last, shows access time. alias sl='ls' # I often screw this up. +# Only make alias if ls supports -XB (darwins BSD style ls doesn't) +if ls -XB &> /dev/null; then + alias lx='ll -XB' # Lists sorted by extension (GNU only). +fi + # Grep if zstyle -t ':prezto:module:utility:grep' color; then export GREP_COLOR='37;45' # BSD.