Skip to content
Snippets Groups Projects

Also export colorized grep

Merged Sylvester Joosten requested to merge colorize_grep into master
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
+ 4
0
@@ -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
Loading