aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-18 14:35:16 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-18 14:35:16 +1200
commit4f9541f1f5e193e252a890062cd01970f2204619 (patch)
treedf091379910710735c2f8db961ecbcc28cd3dd25 /bin
parentUpdate submodules (diff)
downloaddotfiles-4f9541f1f5e193e252a890062cd01970f2204619.tar.gz
dotfiles-4f9541f1f5e193e252a890062cd01970f2204619.zip
Suppress stderr from command -v checks
Now I remember--old Bash prints failure messages to stderr for this call. That'll be why I was suppressing both streams initially.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fgscr2
-rwxr-xr-xbin/shb2
-rwxr-xr-xbin/td2
3 files changed, 3 insertions, 3 deletions
diff --git a/bin/fgscr b/bin/fgscr
index 510fd7cc..9e80cd09 100755
--- a/bin/fgscr
+++ b/bin/fgscr
@@ -2,7 +2,7 @@
# Find all the Git repositories in a directory and scrub them all
# Check we have gscr(1) first
-command -v gscr >/dev/null || exit
+command -v gscr >/dev/null 2>&1 || exit
# Look for any dir named .git in the given (default current) dir and run
# gscr(1) on it
diff --git a/bin/shb b/bin/shb
index 743e5b75..49894b0f 100755
--- a/bin/shb
+++ b/bin/shb
@@ -14,7 +14,7 @@ scr=$1 intn=$2
shift 2
# Try and find the path to the interpreter command, bail out if we can't
-if ! intp=$(command -v "$intn") ; then
+if ! intp=$(command -v "$intn" 2>/dev/null) ; then
printf >&2 '%s: %s: command not found\n' "$self" "$intn"
exit 1
fi
diff --git a/bin/td b/bin/td
index 5088f572..90df92d9 100755
--- a/bin/td
+++ b/bin/td
@@ -12,7 +12,7 @@ file=${1:-"${TODO_NAME:-todo}"}
cd -- "$dir" || exit
# If the current directory isn't a Git repository, try to create one
-if ! command -v isgr >/dev/null ; then
+if ! command -v isgr >/dev/null 2>&1 ; then
printf >&2 'isgr: command not found\n'
exit 1
fi