From 31e09ae48ab0fb7528cca6aac8da866c63d08780 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 6 Sep 2013 14:42:26 +0200 Subject: [PATCH] better psg (ps|grep) --- .bashrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index d45922c..566bd75 100644 --- a/.bashrc +++ b/.bashrc @@ -127,7 +127,10 @@ bind '"\e[B": history-search-forward' # Processes # ############# -alias psg='ps aux|grep -v grep | grep -i --color=auto ' # grep a process +function psg() { + # do not show grep itself color matching string color the PID + ps aux | grep -v grep | grep --ignore-case --color=always $1 | colout '^\S+\s+([0-9]+).*$' blue +} ########## @@ -162,7 +165,7 @@ alias ipy='ipython -pylab -p scipy --editor="gvim"' function cm() { set -o pipefail - $@ 2>&1 | colout -t cmake | colout -t g++ + $@ 2>&1 | colout -t cmake | colout -t g++ } @@ -232,3 +235,4 @@ source ~/.liquidprompt # Added by autojump install.sh #source /etc/profile.d/autojump.bash +export TCLLIBPATH=~/.local/share/tkthemes