aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-10 10:59:03 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-10 10:59:03 +1200
commite688ca5f1cb126f3da3f601e169abfbbda6a8fdf (patch)
tree0e2f56833eb1a2455fa0c4a26ed21a572270c077 /bash/bashrc.d
parentImprove commenting/exit handling in binscripts (diff)
downloaddotfiles-e688ca5f1cb126f3da3f601e169abfbbda6a8fdf.tar.gz
dotfiles-e688ca5f1cb126f3da3f601e169abfbbda6a8fdf.zip
Remove Mercurial support from Bash prompt
Since Vim and Fanboy's list both moved to Git, I have no reason to use it anymore. Also added a note explaining why I've left the SVN stuff in there (I don't like SVN, but I do need to use it for work)
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/prompt.bash37
1 files changed, 0 insertions, 37 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index bef80733..ba678909 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -148,43 +148,6 @@ prompt() {
(IFS= ; printf '(git:%s%s)' "${branch:-unknown}" "${state[*]}")
;;
- # Mercurial prompt function
- hg)
- # Bail if we have no hg(1)
- if ! hash hg 2>/dev/null ; then
- return 1
- fi
-
- # Exit if not inside a Mercurial tree
- local branch
- if ! branch=$(hg branch 2>/dev/null) ; then
- return 1
- fi
-
- # Safely read status with -0
- local line
- local -i modified untracked
- while IFS= read -rd '' line ; do
- if [[ $line == '?'* ]] ; then
- untracked=1
- else
- modified=1
- fi
- done < <(hg status -0 2>/dev/null)
-
- # Build state array from status output flags
- local -a state
- if ((modified)) ; then
- state[${#state[@]}]='!'
- fi
- if ((untracked)) ; then
- state[${#state[@]}]='?'
- fi
-
- # Print the status in brackets with an hg: prefix
- (IFS= ; printf '(hg:%s%s)' "${branch:-unknown}" "${state[*]}")
- ;;
-
# Subversion prompt function
svn)
# Bail if we have no svn(1)