diff options
author | Jan Moesen <github.com@moesen.nu> | 2012-07-23 16:43:46 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2012-07-23 16:45:15 +0200 |
commit | 1dec7d88d479c8951fc24cce1091a048b1894aa0 (patch) | |
tree | df3f77efe58e77ce3949b9316c812b3b7a9883d9 | |
parent | cf79d2cdb811b689605ca5757508ce4a0bf2f127 (diff) | |
download | dotfiles-1dec7d88d479c8951fc24cce1091a048b1894aa0.tar.gz dotfiles-1dec7d88d479c8951fc24cce1091a048b1894aa0.tar.bz2 dotfiles-1dec7d88d479c8951fc24cce1091a048b1894aa0.zip |
.aliases: Optimize the `ls` flavor detection even further
Ref. #89.
-rw-r--r-- | .aliases | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -19,10 +19,10 @@ alias o="open" alias oo="open ." # Detect which `ls` flavor is in use -if ls --color 2> /dev/null | grep -q 'invalid option'; then # OS X `ls` - colorflag="-G" -else # GNU `ls` +if ls --color > /dev/null 2>&1; then # GNU `ls` colorflag="--color" +else # OS X `ls` + colorflag="-G" fi # List all files colorized in long format |