summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-29 01:37:13 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-29 01:37:13 -0500
commitc007a61ad7e885f7f3dadd05bae555e577ce27c9 (patch)
tree4a101a136c47ce1158383ef20bb1b5af4012f34f /.local
parent19542b8e0d4d764a55f433e64d77fa6a58312f1f (diff)
pick: be careful with arguments being flags to 'printf', use stderr
Diffstat (limited to '.local')
-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