Index: fish/functions/fish_prompt.fish ================================================================== --- fish/functions/fish_prompt.fish +++ fish/functions/fish_prompt.fish @@ -7,16 +7,21 @@ set suffix '>' end set -l branch (git symbolic-ref HEAD 2>/dev/null) set branch (string replace -r "^refs/heads/" "" $branch) + + if test -z "$branch" + set branch (fossil branch current) + end + set -l vcs - if test -n "$branch" -a "$branch" != "master" + if test -n "$branch" set vcs (set_color $fish_color_vcs_braces)"(" \ (set_color $fish_color_vcs)"$branch" \ (set_color $fish_color_vcs_braces)")" end echo -n -s (set_color $fish_color_host) (prompt_hostname) ' ' \ (set_color $fish_color_cwd) (prompt_pwd) (string join '' $vcs) \ (set_color $fish_color_suffix) $suffix (set_color normal) ' ' end Index: zshrc ================================================================== --- zshrc +++ zshrc @@ -97,21 +97,15 @@ set_prompt __precmd() { __update_terminal_cwd - local branch="" - - local fossil_branch=$(fossil branch current 2>/dev/null) - if [ -n "$fossil_branch" ]; then - branch="$branch${branch:+ }f:$fossil_branch" - fi - - local git_branch=$(git symbolic-ref HEAD 2>/dev/null) - git_branch=${git_branch##refs/heads/} - if [ -n "$git_branch" ]; then - branch="$branch${branch:+ }g:$git_branch" + local branch=$(git symbolic-ref HEAD 2>/dev/null) + branch=${branch##refs/heads/} + + if [ -z "$branch" ]; then + branch=$(fossil branch current 2>/dev/null) fi set_prompt $branch }