From ecb77cab2a0501ba99771b55959fbc5226ddcbea Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 20:49:42 -0700 Subject: [PATCH] [Shell] Add process_running function --- dotfiles/lib/shellenv/functions.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotfiles/lib/shellenv/functions.sh b/dotfiles/lib/shellenv/functions.sh index eb294624..bde28fc4 100644 --- a/dotfiles/lib/shellenv/functions.sh +++ b/dotfiles/lib/shellenv/functions.sh @@ -445,6 +445,10 @@ function in_git_directory { [ -d .git ] } +function process_running { + [[ ! -z "$(pgrep $@)" ]] +} + function which_readlink { readlink -f "$(which $1)" }