diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-11 15:50:56 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-11 15:50:56 +1200 |
commit | 2cba05a0112a3c827bdb15521b06a52c874c2417 (patch) | |
tree | 508e3b26b533937bf5b338316640703395d9d9ab /bash | |
parent | Misc syntax/grammar corrections (diff) | |
download | dotfiles-2cba05a0112a3c827bdb15521b06a52c874c2417.tar.gz dotfiles-2cba05a0112a3c827bdb15521b06a52c874c2417.zip |
Return values for VCS prompts
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 6 |
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 |