[Assorted-commits] SF.net SVN: assorted: [858] shell-tools/trunk/src/bash-commons
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-06-30 02:59:02
|
Revision: 858 http://assorted.svn.sourceforge.net/assorted/?rev=858&view=rev Author: yangzhang Date: 2008-06-29 19:59:11 -0700 (Sun, 29 Jun 2008) Log Message: ----------- tweaks; added notify() Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash shell-tools/trunk/src/bash-commons/common.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2008-06-30 02:58:41 UTC (rev 857) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2008-06-30 02:59:11 UTC (rev 858) @@ -571,9 +571,19 @@ --tool=memcheck \ --leak-check=yes \ --leak-resolution=high \ - --show-reachable=yes + --show-reachable=yes \ + "$@" } +# From http://www.emilsit.net/blog/archives/reduce-your-context-switch-delay/ +# Does not work with errexit. +notify() { + "$@" + local status=$? + xmessage -center "exited with status $status: $*" + return $status +} + #function set_title() { # if [ $# -eq 0 ] ; then # eval set -- "$PWD" Modified: shell-tools/trunk/src/bash-commons/common.bash =================================================================== --- shell-tools/trunk/src/bash-commons/common.bash 2008-06-30 02:58:41 UTC (rev 857) +++ shell-tools/trunk/src/bash-commons/common.bash 2008-06-30 02:59:11 UTC (rev 858) @@ -15,6 +15,10 @@ cmd_name="$( basename -- "$0" )" +# +# Colors +# + # \e = \E = \033 # 0;34m = 34m # 30's are foregrounds, 40's are backgrounds This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |