X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/27ac2b7eee3cc39e29c470cd5b5889e93091d9be..330c6aff37039f746215d9e293a282dc87e7f080:/contrib/stgbashprompt.sh diff --git a/contrib/stgbashprompt.sh b/contrib/stgbashprompt.sh index 16bb39b..f4817a1 100755 --- a/contrib/stgbashprompt.sh +++ b/contrib/stgbashprompt.sh @@ -8,8 +8,8 @@ if [ "$PS1" ]; then git_dir=$(git-rev-parse --git-dir 2> /dev/null) || return ref=$(git-symbolic-ref HEAD 2> /dev/null) || return br=${ref#refs/heads/} - top=$(cat $git_dir/patches/$br/current 2>/dev/null) \ - && top="/$top" + top=$(tail -n 1 $git_dir/patches/$br/applied 2>/dev/null) \ + && top="/$top"; echo "[$br$top]" } PS1='\u@\h:$(__prompt_git)\W\$ '