From 3f9059777cdda9ec0d84abadff5d7a3fc00b91e4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 14 Mar 2016 13:17:44 +1300 Subject: 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 ... --- bash/bashrc.d/prompt.bash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bash') 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 -- cgit v1.2.3