aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-06-11 15:50:56 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-06-11 15:50:56 +1200
commit2cba05a0112a3c827bdb15521b06a52c874c2417 (patch)
tree508e3b26b533937bf5b338316640703395d9d9ab /bash
parentMisc syntax/grammar corrections (diff)
downloaddotfiles-2cba05a0112a3c827bdb15521b06a52c874c2417.tar.gz
dotfiles-2cba05a0112a3c827bdb15521b06a52c874c2417.zip
Return values for VCS prompts
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 28f61b22..2a135bbd 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -99,7 +99,7 @@ function prompt_git {
[[ -n "$(git status 2>/dev/null | \
grep -F 'working directory clean')" ]] || STATUS="!"
echo -n "(git:${BRANCH:-unknown}${STATUS})"
- return 0
+ return $?
}
# Function to display branch of an SVN working copy.
@@ -115,7 +115,7 @@ function prompt_svn {
BRANCH=${BRANCH%%/*}
[[ -n "$(svn status 2>/dev/null)" ]] && STATUS="!"
echo -n "(svn:${BRANCH:-unknown}${STATUS})"
- return 0
+ return $?
}
# Function to display branch of a Mercurial repository.
@@ -124,7 +124,7 @@ function prompt_hg {
BRANCH="$(hg branch 2>/dev/null)"
[[ -n "$(hg status 2>/dev/null)" ]] && STATUS="!"
echo -n "(hg:${BRANCH:-unknown}${STATUS})"
- return 0
+ return $?
}
# Function that calls each of the above in order of how likely I am to be