diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2011-03-08 10:43:43 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2011-03-08 10:43:43 +0100 |
commit | 8664c9bbef31bbca33be27731efe7634bf260836 (patch) | |
tree | 8d4636f84d08d30225de0e8b3d52ad20332dfcfa | |
parent | 6bfe524a84f9c6456c52a000fff7fd717b68a9b9 (diff) |
enable colour support for ls and man
-rw-r--r-- | .zsh/zshrc/30_aliases | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index b0c12fe..f477b50 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -21,6 +21,17 @@ alias grep='grep --color=auto' alias m='mount' alias u='umount' +# enable color support of ls +if [ "${TERM}" != "dumb" ]; then + eval `dircolors -b` + alias ls='ls --color=auto' +fi + +# use colors when browsing man pages, but only if not using LESS_TERMCAP_* +if [ -z "$LESS_TERMCAP_md" ] ; then + [ -d ~/.terminfo/ ] && alias man='TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man' +fi + # no spelling correction for these alias cp='nocorrect cp' alias ln='nocorrect ln' |