diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 22:38:56 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 22:38:56 -0500 |
commit | a12f3189bcf6d2cf277acfa7824961b158bd57e6 (patch) | |
tree | f90abee14a9ba0918de7171c9223fd7079e29b41 /.local/bin/pick | |
parent | 8d5402c81566b7dbef4839a78b5cb2623b9857a0 (diff) |
stuff
Diffstat (limited to '.local/bin/pick')
-rwxr-xr-x | .local/bin/pick | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/pick b/.local/bin/pick index ed2d44d..6dc905f 100755 --- a/.local/bin/pick +++ b/.local/bin/pick @@ -19,7 +19,7 @@ if [[ $1 = -s ]]; then shift # Scan to find a running instance for prog in "$@"; do - if [[ -n "`pgrep $prog`" ]]; then + if [[ -n "$(pgrep "${prog%% *}")" ]]; then printf '%s\n' "$prog" exit 0 fi @@ -28,7 +28,7 @@ fi # Scan to find one that is installed for prog in "$@"; do - if [[ -x "`which $prog 2>/dev/null`" ]]; then + if [[ -x "$(which "${prog%% *}" 2>/dev/null)" ]]; then printf '%s\n' "$prog" exit 0 fi |