From 47a22743750a3791aaaf29560a690aa822ce651b Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Fri, 13 Oct 2023 09:08:35 -0400 Subject: [PATCH] Add proc-grep --- configs/zsh/macros.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configs/zsh/macros.sh b/configs/zsh/macros.sh index 82b8706..41869fc 100644 --- a/configs/zsh/macros.sh +++ b/configs/zsh/macros.sh @@ -158,3 +158,12 @@ wg-cat() { sudo cat /etc/wireguard/$1.conf fi } + +# Search for a process +proc-grep() { + if [ $# != 1 ]; then + echo "Usage: proc-grep " + else + ps aux | { head -1; grep $1 } + fi +}