diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-20 20:09:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-20 20:09:42 +1200 |
commit | c3e462bf2b8f14bdaabc96f419558a7f0dfdf1ef (patch) | |
tree | e1923916275db29771f16558c1787582d572686a /bash/bashrc.d | |
parent | Add completion for mex(1df) (diff) | |
download | dotfiles-c3e462bf2b8f14bdaabc96f419558a7f0dfdf1ef.tar.gz dotfiles-c3e462bf2b8f14bdaabc96f419558a7f0dfdf1ef.zip |
Add some var quoting within param expansion
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index b3a26c89..856e20e6 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -114,15 +114,15 @@ prompt() { # Check various files in .git to flag processes local proc [[ -d .git/rebase-merge || -d .git/rebase-apply ]] && - proc=${proc:+$proc,}'REBASE' + proc=${proc:+"$proc",}'REBASE' [[ -f .git/MERGE_HEAD ]] && - proc=${proc:+$proc,}'MERGE' + proc=${proc:+"$proc",}'MERGE' [[ -f .git/CHERRY_PICK_HEAD ]] && - proc=${proc:+$proc,}'PICK' + proc=${proc:+"$proc",}'PICK' [[ -f .git/REVERT_HEAD ]] && - proc=${proc:+$proc,}'REVERT' + proc=${proc:+"$proc",}'REVERT' [[ -f .git/BISECT_LOG ]] && - proc=${proc:+$proc,}'BISECT' + proc=${proc:+"$proc",}'BISECT' # Collect symbols representing repository state local state @@ -157,7 +157,7 @@ prompt() { # Print the status in brackets; add a git: prefix only if there # might be another VCS prompt (because PROMPT_VCS is set) printf '(%s%s%s%s)' \ - "${PROMPT_VCS:+git:}" "$name" "${proc:+:$proc}" "$state" + "${PROMPT_VCS:+git:}" "$name" "${proc:+:"$proc"}" "$state" ;; # Subversion prompt function |