From 8664c9bbef31bbca33be27731efe7634bf260836 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 8 Mar 2011 10:43:43 +0100 Subject: enable colour support for ls and man --- .zsh/zshrc/30_aliases | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.zsh/zshrc') 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' -- cgit v1.2.3-54-g00ecf