summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Coupar <grambo@grambo.me.uk>2012-08-17 16:58:35 +0100
committerGraeme Coupar <grambo@grambo.me.uk>2012-08-17 17:13:09 +0100
commitd3f6507a2e432efe48a3b8ac8f45c32e7d2ab656 (patch)
treeb061a36041a5ae3123311a755c293e18af7e6041
parentd05b2010ffd4cd33ff9402c402051b1caf985d97 (diff)
downloadzsh-d3f6507a2e432efe48a3b8ac8f45c32e7d2ab656.tar.gz
zsh-d3f6507a2e432efe48a3b8ac8f45c32e7d2ab656.tar.bz2
zsh-d3f6507a2e432efe48a3b8ac8f45c32e7d2ab656.zip
Debian plugin now pipes which stderr to stdout
The debian plugin calls which to determine whether aptitude & sudo are installed. However, if these are not installed then the error output from which will be output. Since this isn't really an error condition, this commit updates the which calls to pipe stderr to stdout, thus hiding the error messages.
-rw-r--r--plugins/debian/debian.plugin.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh
index 39d3ef36a..da86b1711 100644
--- a/plugins/debian/debian.plugin.zsh
+++ b/plugins/debian/debian.plugin.zsh
@@ -6,14 +6,14 @@
# Use aptitude if installed, or apt-get if not.
# You can just set apt_pref='apt-get' to override it.
-if [[ -e $( which aptitude ) ]]; then
+if [[ -e $( which aptitude 2>&1 ) ]]; then
apt_pref='aptitude'
else
apt_pref='apt-get'
fi
# Use sudo by default if it's installed
-if [[ -e $( which sudo ) ]]; then
+if [[ -e $( which sudo 2>&1 ) ]]; then
use_sudo=1
fi