1
1
Fork 0

zshrc: Show the fossil branch

This commit is contained in:
Jonathan Schleifer 2020-05-23 15:00:03 +00:00
parent 77cc7969d4
commit 51b6c3d533

8
zshrc
View file

@ -99,9 +99,13 @@ set_prompt
__precmd() { __precmd() {
__update_terminal_cwd __update_terminal_cwd
local branch=$(git symbolic-ref HEAD 2>/dev/null) local branch=$(fossil branch current 2>/dev/null)
if [ -z "$branch" ]; then
branch=$(git symbolic-ref HEAD 2>/dev/null)
branch=${branch##refs/heads/} branch=${branch##refs/heads/}
[ "$branch" = master ] && branch="" fi
set_prompt $branch set_prompt $branch
} }