aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@staff.inspire.net.nz>2016-08-31 13:29:18 +1200
committerTom Ryder <tom@staff.inspire.net.nz>2016-08-31 13:29:18 +1200
commit2e783635b47b7b7ed2d04830cd3193f19de8cbbb (patch)
tree417b342ecef5fe874e74ecff3759f2ed5422c14e /bash/bashrc.d/prompt.bash
parentRemove unneeded fallback for $name (diff)
downloaddotfiles-2e783635b47b7b7ed2d04830cd3193f19de8cbbb.tar.gz
dotfiles-2e783635b47b7b7ed2d04830cd3193f19de8cbbb.zip
Stop loop when we have needed svn info vars
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash5
1 files changed, 2 insertions, 3 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 340bca54..5abcf4d8 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -166,7 +166,7 @@ prompt() {
svn)
# Determine the repository URL and root directory
local key value url root
- while IFS=: read -r key value ; do
+ while [[ -z $url || -z $root ]] && IFS=: read -r key value ; do
case $key in
'URL')
url=${value## }
@@ -179,8 +179,7 @@ prompt() {
# Exit if we couldn't get either--or, implicitly, if we don't have
# svn(1).
- [[ -n $url ]] || return
- [[ -n $root ]] || return
+ [[ -n $url && -n $root ]] || return
# Remove the root from the URL to get what's hopefully the branch
# name, removing leading slashes and the 'branches' prefix, and any