From fb13f9cbeedbe161a309d8a9d86ee8d7b9baa078 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Mon, 29 Sep 2014 21:54:25 -0400 Subject: [PATCH] Add Linux color support when changing directories --- zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 07201db..fc89886 100644 --- a/zshrc +++ b/zshrc @@ -1,3 +1,5 @@ +platform=`uname` + # Path to your oh-my-zsh configuration. ZSH=$HOME/.zsh @@ -17,7 +19,11 @@ bindkey "^N" insert-last-word # Show contents of directory after cd-ing into it chpwd() { - ls -lrthG + if [[ $platform == 'Linux' ]]; then + ls -lrthG --color + elif [[ $platform == 'Darwin' ]]; then + ls -lrthG + fi } # Unbreak broken, non-colored terminal