aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-01 03:36:56 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-01 03:36:56 +1200
commit08a77d41acfd1e2a6e1aded3ec4632badabc84e3 (patch)
tree5810eebeaa86ded45bcd846bf1bfb090eb2097cd /bash
parentComplete exec with commands (diff)
downloaddotfiles-08a77d41acfd1e2a6e1aded3ec4632badabc84e3.tar.gz
dotfiles-08a77d41acfd1e2a6e1aded3ec4632badabc84e3.zip
Remove instances of error-prone &> redirection
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/prompt.bash6
-rw-r--r--bash/bashrc.d/tmux.bash2
2 files changed, 4 insertions, 4 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 0107c458..68656284 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -50,7 +50,7 @@ prompt() {
# Read the repository's status to refresh its info; ignore all the
# output; give up if this fails
- if ! git status &>/dev/null; then
+ if ! git status >/dev/null 2>&1; then
return 1
fi
@@ -78,7 +78,7 @@ prompt() {
fi
# If there are any stashed changes, add a circumflex to the state
- if git rev-parse --verify refs/stash &>/dev/null; then
+ if git rev-parse --verify refs/stash >/dev/null 2>&1; then
state[${#state[@]}]='^'
fi
@@ -118,7 +118,7 @@ prompt() {
# Subversion prompt function
svn)
# Exit if not inside a Subversion working copy
- if ! svn info &>/dev/null; then
+ if ! svn info >/dev/null 2>&1; then
return 1
fi
diff --git a/bash/bashrc.d/tmux.bash b/bash/bashrc.d/tmux.bash
index 3a26b5db..1a160790 100644
--- a/bash/bashrc.d/tmux.bash
+++ b/bash/bashrc.d/tmux.bash
@@ -8,7 +8,7 @@ tmux() {
# If no arguments, attempt to attach to an existing session; if that fails,
# run the tmux binary with no arguments, which by default creates a new
# session
- elif ! command tmux attach -d &>/dev/null; then
+ elif ! command tmux attach -d 2>/dev/null; then
command tmux
fi
}