diff options
author | Alan Pearce | 2013-09-15 17:51:13 +0100 |
---|---|---|
committer | Alan Pearce | 2013-09-15 17:51:42 +0100 |
commit | 52cb39f3cc213cb652e7a22a33614244dbfc25b0 (patch) | |
tree | 4d328173548f2ae26e47634b62519460b7d938cd /zsh/zshrc | |
parent | 75cb3c23b9bc89f9743be6454164c7fe28102bbb (diff) | |
download | nixfiles-52cb39f3cc213cb652e7a22a33614244dbfc25b0.tar.lz nixfiles-52cb39f3cc213cb652e7a22a33614244dbfc25b0.tar.zst nixfiles-52cb39f3cc213cb652e7a22a33614244dbfc25b0.zip |
zsh: Use gls instead of ls if available
Diffstat (limited to 'zsh/zshrc')
-rwxr-xr-x | zsh/zshrc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/zsh/zshrc b/zsh/zshrc index 64222622..cefe87f5 100755 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -264,16 +264,22 @@ alias md='mkdir -p' alias rd='rmdir' alias .='source' -alias l="\ls ${ls_options} -Bp" -alias l1="\ls ${ls_options} -1" -alias ls="\ls ${ls_options} -hF" -alias la="\ls ${ls_options} -hA" -alias ll="\ls ${ls_options} ${ls_isodate} -hl" +if [[ -n $osx && -n $commands[gls] ]] +then + ls='\gls' +else + ls='\ls' +fi +alias l="${ls} ${ls_options} -Bp" +alias l1="${ls} ${ls_options} -1" +alias ls="${ls} ${ls_options} -hF" +alias la="${ls} ${ls_options} -hA" +alias ll="${ls} ${ls_options} ${ls_isodate} -hl" alias lal="ll -A" alias lla="lal" alias llr="ll -t" alias gpp='g++' -alias lsr="ls -tld *(m-2)" # mtime < -2days +alias lsr="${ls} -tld *(m-2)" # mtime < -2days alias trans="transmission-remote transmission.home" alias bitcoin="bitcoind" |