diff options
| author | Miquel Sabaté <mikisabate@gmail.com> | 2014-02-10 08:27:40 +0100 |
|---|---|---|
| committer | Miquel Sabaté <mikisabate@gmail.com> | 2014-02-10 08:27:40 +0100 |
| commit | da6f38628aa117047c24a552da6731be5a5bd49d (patch) | |
| tree | 2624f3a6fd8c2b98e92b5b61edc63d93c881db4f | |
| parent | 7a6de71eae3a4bd0911e99167677b2deb374f1c8 (diff) | |
| download | dotfiles-da6f38628aa117047c24a552da6731be5a5bd49d.tar.gz dotfiles-da6f38628aa117047c24a552da6731be5a5bd49d.zip | |
bashrc: Let's treat Mercurial as a first-class citizen.
| -rw-r--r-- | bashrc | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -22,15 +22,21 @@ TERM=xterm-256color export LESS="FSRX" export PAGER=less -# git completion +# git thingies. source $HOME/.gitcompletion.sh -PS1='\u:\w$(__git_ps1 "\[\033[0;32m\]@\[\033[1;32m\]%s\[\033[0m\]\]") $ ' - -# A typo I do a lot... alias gti=git -# hg completion +# hg thingies. source $HOME/.hgcompletion.sh +__hg_branch() { + if [ -d .hg ]; then + local b=`cat .hg/branch` + echo -e "\033[0;32m@\033[1;32m$b\033[0m" + fi +} + +# Setting up PS1. +PS1='\u:\w$(__hg_branch)$(__git_ps1 "\[\033[0;32m\]@\[\033[1;32m\]%s\[\033[0m\]\]") $ ' # Rake completion complete -C $HOME/.rake_completion -o default rake |
