Index: fish/functions/fish_prompt.fish ================================================================== --- fish/functions/fish_prompt.fish +++ fish/functions/fish_prompt.fish @@ -5,15 +5,15 @@ set suffix (set_color $fish_color_cwd_root)'#' case '*' set suffix '>' end - set -l branch (git symbolic-ref HEAD 2>/dev/null) - set branch (string replace -r "^refs/heads/" "" $branch) + set -l branch (fossil branch current 2>/dev/null) if test -z "$branch" - set branch (fossil branch current 2>/dev/null) + set branch (git symbolic-ref HEAD 2>/dev/null) + set branch (string replace -r "^refs/heads/" "" $branch) end set -l vcs if test -n "$branch" set vcs (set_color $fish_color_vcs_braces)"(" \ Index: zshrc ================================================================== --- zshrc +++ zshrc @@ -101,15 +101,15 @@ set_prompt __precmd() { __update_terminal_cwd - local branch=$(git symbolic-ref HEAD 2>/dev/null) - branch=${branch##refs/heads/} + local branch=$(fossil branch current 2>/dev/null) if [ -z "$branch" ]; then - branch=$(fossil branch current 2>/dev/null) + branch=$(git symbolic-ref HEAD 2>/dev/null) + branch=${branch##refs/heads/} fi set_prompt $branch }