Preserve picked patch name when possible
[stgit.git] / contrib / stgbashprompt.sh
blob034d28f54f9784c80ee0195bbb03d56a4c7d1cb4
1 # modify PS1 to your preference and include this file in your bashrc
2 # or copy to /etc/bash_completions.d.
4 if [ "$PS1" ]; then
5 function __prompt_git()
7 local br top
8 br=$(stg branch 2>/dev/null) || return
9 top=$(stg top 2>/dev/null) || return
10 echo "[$top@$br]"
12 PS1='\u@\h:$(__prompt_git)\W\$ '