diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-14 13:17:44 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-14 13:17:44 +1300 |
commit | 3f9059777cdda9ec0d84abadff5d7a3fc00b91e4 (patch) | |
tree | 63ea8e1686275edc7cfeed05fbee459af4e6f92a /bash/bashrc.d/prompt.bash | |
parent | Correct typo in terminfo code (diff) | |
download | dotfiles-3f9059777cdda9ec0d84abadff5d7a3fc00b91e4.tar.gz dotfiles-3f9059777cdda9ec0d84abadff5d7a3fc00b91e4.zip |
Only show git VCS stuff by default
On my work machines, I'll make a file ~/.bashrc.d/prompt.bash which
includes a PROMPT_VCS=(git svn) line.
I don't really use Mercurial at all, now that the Vim sources have moved
to Git; certainly not enough to check for it on every prompt load ...
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 307c577b..4d2afc09 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -237,7 +237,12 @@ prompt() { # VCS wrapper prompt function; print the first relevant prompt, if any vcs) - prompt git || prompt svn || prompt hg + local vcs + for vcs in "${PROMPT_VCS[@]:-git}" ; do + if prompt "$vcs" ; then + return + fi + done ;; # Show return status of previous command in angle brackets, if not zero |