Add Linux color support when changing directories
This commit is contained in:
parent
50b1f41dc6
commit
fb13f9cbee
8
zshrc
8
zshrc
|
@ -1,3 +1,5 @@
|
||||||
|
platform=`uname`
|
||||||
|
|
||||||
# Path to your oh-my-zsh configuration.
|
# Path to your oh-my-zsh configuration.
|
||||||
ZSH=$HOME/.zsh
|
ZSH=$HOME/.zsh
|
||||||
|
|
||||||
|
@ -17,7 +19,11 @@ bindkey "^N" insert-last-word
|
||||||
|
|
||||||
# Show contents of directory after cd-ing into it
|
# Show contents of directory after cd-ing into it
|
||||||
chpwd() {
|
chpwd() {
|
||||||
ls -lrthG
|
if [[ $platform == 'Linux' ]]; then
|
||||||
|
ls -lrthG --color
|
||||||
|
elif [[ $platform == 'Darwin' ]]; then
|
||||||
|
ls -lrthG
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Unbreak broken, non-colored terminal
|
# Unbreak broken, non-colored terminal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user