Skip to content

Commit

Permalink
.bash_profile: Redirect all which brew output
Browse files Browse the repository at this point in the history
On RHEL6, `which brew` prints `/usr/bin/which: no brew in …` to stderr. Changing `> /dev/null` to `&>/dev/null` redirects both stdout and stderr to `/dev/null`, silencing the check completely.

Closes mathiasbynens#650.
  • Loading branch information
epruesse authored and mathiasbynens committed Apr 21, 2016
1 parent 5689fa8 commit 986f56f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for option in autocd globstar; do
done;

# Add tab completion for many Bash commands
if which brew > /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
if which brew &> /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
source "$(brew --prefix)/share/bash-completion/bash_completion";
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion;
Expand Down

0 comments on commit 986f56f

Please sign in to comment.