zshrc: Show the fossil branch
This commit is contained in:
parent
77cc7969d4
commit
51b6c3d533
1 changed files with 7 additions and 3 deletions
10
zshrc
10
zshrc
|
@ -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)
|
||||||
branch=${branch##refs/heads/}
|
|
||||||
[ "$branch" = master ] && branch=""
|
if [ -z "$branch" ]; then
|
||||||
|
branch=$(git symbolic-ref HEAD 2>/dev/null)
|
||||||
|
branch=${branch##refs/heads/}
|
||||||
|
fi
|
||||||
|
|
||||||
set_prompt $branch
|
set_prompt $branch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue