Loading

Paste #p90a7jold

  1. hg_ps1() {
  2.     if $(hg st > /dev/null 2>&1); then
  3.         hg log -r. --template=' {branch}-r{rev}{if(tags," ({tags})")}{if(bookmarks," ({bookmarks})")} '
  4.     fi
  5. }
  6. hg_ps2() {
  7.     if $(hg st > /dev/null 2>&1); then
  8.         basename $(hg root)
  9.     fi
  10. }
  11.  
  12. export PS1='\u@\h\e[32m $(hg_ps2)\e[31m$(hg_ps1)\e[39m\w $ '
  13.  
  14. export TERM=xterm-256color

Comments