X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=20bb047567d2e0fd831c5eab79cdce9b2a57c640;hb=a554566fc3710cdffa9a829062f33454605a7589;hp=61e19c4abf32c2cb5d42c444dedcaed3a9a33483;hpb=d7b0d4b552c9eda6ab0af9d8c7e5ecbb708db622;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 61e19c4a..20bb0475 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -99,11 +99,15 @@ if [ -z "$skip_all" ]; then # finds all processes matching the pattern specified and shows their full # process listing (whereas psfind just lists process ids). function psa() { - p=$(psfind "$1") - if [ -z "$p" ]; then + if [ -z "$1" ]; then echo "psa finds processes by pattern, but there was no pattern on the command line." return 1 fi + p=$(psfind "$1") + if [ -z "$p" ]; then + # no matches. + return 0 + fi echo "" echo "Processes containing \"$1\"..." echo ""