]> git.phdru.name Git - dotfiles.git/commitdiff
.profile, .shellrc: use dircolors
authorOleg Broytman <phd@phdru.name>
Tue, 6 Oct 2015 18:55:17 +0000 (21:55 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 6 Oct 2015 18:55:17 +0000 (21:55 +0300)
.profile
.shellrc

index a3981654b8335650b053d99b6a95d4c84c921f73..564c40fb73eb26157692264ac75ce4d5c4602cdf 100644 (file)
--- a/.profile
+++ b/.profile
@@ -75,6 +75,10 @@ if [ -t 0 ] ; then
       ;;
    esac
 
+   if [ -x /usr/bin/dircolors ]; then
+       test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+   fi
+
    PAGER=less
    LESS="gimq"
    case "$LC_CTYPE" in
index d2e56a6702f1a356de72a521bb17f2b94fa45323..e189ac8523855e69b85a786f84b1d2c1c16fb277 100644 (file)
--- a/.shellrc
+++ b/.shellrc
@@ -141,6 +141,10 @@ include()
 }
 
 
+grep() { command grep --color=auto "$@"; }
+fgrep() { command fgrep --color=auto "$@"; }
+egrep() { command egrep --color=auto "$@"; }
+ls() { command ls --color=auto "$@"; }
 
 
 mc() {