Skip to content

Commit 986f56f

Browse files
epruessemathiasbynens
authored andcommitted
.bash_profile: Redirect all which brew output
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.
1 parent 5689fa8 commit 986f56f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.bash_profile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ for option in autocd globstar; do
2626
done;
2727

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

0 commit comments

Comments
 (0)