Skip to content
Snippets Groups Projects
Commit 982fe9ae authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Merge branch 'colorize_grep' into 'master'

Also export colorized grep

See merge request !85
parents 3ce98b13 cd34439a
No related branches found
No related tags found
1 merge request!85Also export colorized grep
...@@ -17,6 +17,9 @@ function ls { ...@@ -17,6 +17,9 @@ function ls {
function less { function less {
/usr/bin/less -R $@ /usr/bin/less -R $@
} }
function grep {
/bin/grep --color=auto $@
}
MYSHELL=$(ps -p $$ | awk '{print($4);}' | tail -n1) MYSHELL=$(ps -p $$ | awk '{print($4);}' | tail -n1)
## only export the functions for bash, as this does not work ## only export the functions for bash, as this does not work
## in all shells and we only care about bash here. Note that ## in all shells and we only care about bash here. Note that
...@@ -25,5 +28,6 @@ MYSHELL=$(ps -p $$ | awk '{print($4);}' | tail -n1) ...@@ -25,5 +28,6 @@ MYSHELL=$(ps -p $$ | awk '{print($4);}' | tail -n1)
if [ "$MYSHELL" == "bash" ]; then if [ "$MYSHELL" == "bash" ]; then
export -f ls export -f ls
export -f less export -f less
export -f grep
fi fi
unset MYSHELL unset MYSHELL
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment