From 52cb39f3cc213cb652e7a22a33614244dbfc25b0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 15 Sep 2013 17:51:13 +0100 Subject: zsh: Use gls instead of ls if available --- zsh/zshrc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'zsh/zshrc') 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" -- cgit 1.4.1