diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-21 17:47:35 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-21 17:47:35 +1200 |
commit | f728b52425dc44b79bdbb01ca0f21386f3ddeb17 (patch) | |
tree | 597dbb0c98e7813ebf9782b025e42265628292be /bash/bashrc.d/prompt.bash | |
parent | Complete overhaul of git prompt function (diff) | |
download | dotfiles-f728b52425dc44b79bdbb01ca0f21386f3ddeb17.tar.gz dotfiles-f728b52425dc44b79bdbb01ca0f21386f3ddeb17.zip |
svn has no concept of staging, remove '+' usage
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index f5566323..61d2a39a 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -159,30 +159,21 @@ prompt() { branch=${branch%%/*} # Parse the output of svn info to determine working copy state - local symbol new added modified - while read -r symbol _; do - case $symbol in - *'?'*) - new=1 - ;; - *A*) - added=1 - ;; - *) - modified=1 - ;; - esac + local symbol modified untracked + while read -r symbol; do + if [[ $symbol == *'?'* ]]; then + untracked=1 + else + modified=1 + fi done < <(svn status 2>/dev/null) # Add appropriate state flags local -a state - if [[ $added ]]; then - state=("${state[@]}" '+') - fi if [[ $modified ]]; then state=("${state[@]}" '!') fi - if [[ $new ]]; then + if [[ $untracked ]]; then state=("${state[@]}" '?') fi |