list, thanks for the basic idea - Karl Voit!
+grml-etc-core (0.2.4) unstable; urgency=low
+
+ * /etc/zsh/zshrc: add alias 'any' for grepping through process
+ list, thanks for the basic idea - Karl Voit!
+
+ -- Michael Prokop <mika@grml.org> Sat, 2 Dec 2006 11:51:06 +0100
+
grml-etc-core (0.2.3) unstable; urgency=low
* Let's ship /etc/apt/preferences.grml as reference file.
type -p fma &>/dev/null && alias ?='fma zshall'
+ # grep for running process, like: 'any vim'
+ any() {
+ if [ -z "$1" ] ; then
+ echo "any - grep for process(es) by keyword" >&2
+ echo "Usage: any <keyword>" >&2 ; return 1
+ else
+ local STRING=$1
+ local LENGTH=$(expr length $STRING)
+ local FIRSCHAR=$(echo $(expr substr $STRING 1 1))
+ local REST=$(echo $(expr substr $STRING 2 $LENGTH))
+ ps xauwww| grep [$FIRSCHAR]$REST
+ fi
+ }
+
# }}}
# {{{ make sure our environment is clean regarding colors