aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté <mikisabate@gmail.com>2014-02-16 22:09:35 +0100
committerMiquel Sabaté <mikisabate@gmail.com>2014-02-16 22:09:35 +0100
commit0e46f492cf1443c75293fdd615879fe623a3300b (patch)
tree0e4a524a68f67a45fa9a8dc634811e057005e7ab
parentd4d44cf888d75db3b7d994e78aa9ddc688d02c91 (diff)
downloaddotfiles-0e46f492cf1443c75293fdd615879fe623a3300b.tar.gz
dotfiles-0e46f492cf1443c75293fdd615879fe623a3300b.zip
bash: on MacOS X, we don't use the default ls command.
Instead we use the GNU ls command.
-rw-r--r--bashrc10
1 files changed, 7 insertions, 3 deletions
diff --git a/bashrc b/bashrc
index 5da0304..24b0b9a 100644
--- a/bashrc
+++ b/bashrc
@@ -2,9 +2,13 @@
export LC_ALL=en_US.UTF-8
# beautifying ls command
-alias ls='ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
-alias ll='ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
-alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
+lsc="ls"
+if [ `uname` == "Darwin" ]; then
+ lsc="gls"
+fi
+alias ls='$lsc --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
+alias ll='$lsc -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
+alias la='$lsc -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
# Alias related to cd
alias ..='cd ..'