diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-21 15:06:14 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-21 15:06:14 +1200 |
commit | 9a951fe4d28fe71b022b1277e997e921cbc66093 (patch) | |
tree | a20175fa26c4dea25a42c37a58ca422227922238 /bash | |
parent | Don't hash MySQL completions (diff) | |
download | dotfiles-9a951fe4d28fe71b022b1277e997e921cbc66093.tar.gz dotfiles-9a951fe4d28fe71b022b1277e997e921cbc66093.zip |
Write 'added' check for Bash SVN prompt
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 1ad239d9..12d8ab04 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -169,12 +169,15 @@ prompt() { branch=${branch%%/*} # Parse the output of svn info to determine working copy state - local symbol new modified + local symbol new added modified while read -r symbol _; do case $symbol in *'?'*) new=1 ;; + *A*) + added=1 + ;; *) modified=1 ;; @@ -183,6 +186,9 @@ prompt() { # Add appropriate state flags local -a state + if [[ $added ]]; then + state=("${state[@]}" '+') + fi if [[ $modified ]]; then state=("${state[@]}" '!') fi |