diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 15:22:40 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 15:22:40 +1200 |
commit | e473db4c63c684c93372eae00d76b0411a26eee5 (patch) | |
tree | b5001787b7b5478bab7161a237e6c6c873ec5447 | |
parent | Target terminfo first, then termcap (diff) | |
download | dotfiles-e473db4c63c684c93372eae00d76b0411a26eee5.tar.gz dotfiles-e473db4c63c684c93372eae00d76b0411a26eee5.zip |
Use clearer quoting for status flags
-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 a3f32235..a40ea958 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -126,27 +126,27 @@ prompt() { # Upstream HEAD has commits after local HEAD; we're "behind" (($(git rev-list --count 'HEAD..@{u}' 2>/dev/null) > 0)) && - state=${state}\< + state=${state}'<' # Local HEAD has commits after upstream HEAD; we're "ahead" (($(git rev-list --count '@{u}..HEAD' 2>/dev/null) > 0)) && - state=${state}\> + state=${state}'>' # Tracked files are modified git diff-files --quiet || - state=${state}\! + state=${state}'!' # Changes are staged git diff-index --cached --quiet HEAD || - state=${state}\+ + state=${state}'+' # There are some untracked and unignored files [[ -n $(git ls-files --others --exclude-standard) ]] && - state=${state}\? + state=${state}'?' # There are stashed changes git rev-parse --quiet --verify refs/stash >/dev/null && - state=${state}\^ + state=${state}'^' # Print the status in brackets; add a git: prefix only if there # might be another VCS prompt (because PROMPT_VCS is set) |