summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.local/bin/pick6
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/bin/pick b/.local/bin/pick
index 6dc905f..7458041 100755
--- a/.local/bin/pick
+++ b/.local/bin/pick
@@ -20,7 +20,7 @@ if [[ $1 = -s ]]; then
# Scan to find a running instance
for prog in "$@"; do
if [[ -n "$(pgrep "${prog%% *}")" ]]; then
- printf '%s\n' "$prog"
+ printf -- '%s\n' "$prog"
exit 0
fi
done
@@ -29,10 +29,10 @@ fi
# Scan to find one that is installed
for prog in "$@"; do
if [[ -x "$(which "${prog%% *}" 2>/dev/null)" ]]; then
- printf '%s\n' "$prog"
+ printf -- '%s\n' "$prog"
exit 0
fi
done
-printf '%s\n' "$cmd: no suitable program found"
+printf -- '%s\n' "$cmd: no suitable program found" >&2
exit 1