aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-08-02 13:59:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-08-02 13:59:10 +1200
commit0b7c9900760e6af9e6adb5977a5b2425a399d85f (patch)
treeb2942c2b8497790e879bec334f75c512560567f6
parentUpgrading submodules (diff)
downloaddotfiles-0b7c9900760e6af9e6adb5977a5b2425a399d85f.tar.gz
dotfiles-0b7c9900760e6af9e6adb5977a5b2425a399d85f.zip
Restore stderr redirection for command -v
Some older versions of Bash seem to spit out "not found" errors for command -v on stderr
-rw-r--r--bash/bash_logout2
-rw-r--r--bash/bashrc4
-rw-r--r--bash/bashrc.d/ls.bash2
-rw-r--r--sh/profile.d/keychain.sh4
4 files changed, 6 insertions, 6 deletions
diff --git a/bash/bash_logout b/bash/bash_logout
index 30b0c143..4436082f 100644
--- a/bash/bash_logout
+++ b/bash/bash_logout
@@ -1,5 +1,5 @@
# Clear console if possible when logging out
-if [[ "$SHLVL" = 1 ]] && command -v clear_console >/dev/null; then
+if [[ "$SHLVL" = 1 ]] && command -v clear_console &>/dev/null; then
clear_console -q
fi
diff --git a/bash/bashrc b/bash/bashrc
index 1ae8960a..7924a7e1 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -17,12 +17,12 @@ HISTTIMEFORMAT='%F %T '
unset MAILCHECK
# Never beep at me
-if command -v setterm >/dev/null; then
+if command -v setterm &>/dev/null; then
setterm -bfreq 0
fi
# Turn off annoying and useless flow control keys
-if command -v stty >/dev/null; then
+if command -v stty &>/dev/null; then
stty -ixon
fi
diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash
index 7395224d..d1afd04c 100644
--- a/bash/bashrc.d/ls.bash
+++ b/bash/bashrc.d/ls.bash
@@ -15,7 +15,7 @@ alias ls="ls $(__lsopts)"
unset __lsopts
# Define and store appropriate colors for ls
-if command -v dircolors >/dev/null; then
+if command -v dircolors &>/dev/null; then
eval "$(dircolors --sh)"
fi
diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh
index 6ce780fb..08f1a4cc 100644
--- a/sh/profile.d/keychain.sh
+++ b/sh/profile.d/keychain.sh
@@ -1,11 +1,11 @@
# ssh-askpass setup
-if command -v ssh-askpass >/dev/null; then
+if command -v ssh-askpass >/dev/null 2>&1; then
SSH_ASKPASS=$(which ssh-askpass)
export SSH_ASKPASS
fi
# keychain setup
-if command -v keychain >/dev/null; then
+if command -v keychain >/dev/null 2>&1; then
eval $(keychain --eval --ignore-missing --quiet id_dsa id_rsa id_ecsda)
fi