Differences From Artifact [9b3d902cb4]:
- File config/fish/functions/fish_prompt.fish — part of check-in [bed5a23ae3] at 2020-02-19 21:46:19 on branch trunk — Consistent indenting for .fish files (user: js, size: 813) [annotate] [blame] [check-ins using]
- File fish/functions/fish_prompt.fish — part of check-in [24d2eb82f0] at 2020-02-20 22:07:34 on branch trunk — Remove useless config subdirectory (user: js, size: 813) [annotate] [blame] [check-ins using]
To Artifact [7fb3140ed6]:
- File
fish/functions/fish_prompt.fish
— part of check-in
[aed8907a52]
at
2020-05-24 20:51:51
on branch trunk
— Add Fossil branch to fish prompt
Also prefer Git over Fossil branch instead of showing both in zsh. (user: js, size: 870) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 | function fish_prompt --description 'Write out the prompt' set -l suffix switch "$USER" case root toor 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 vcs | > > > > > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | function fish_prompt --description 'Write out the prompt' set -l suffix switch "$USER" case root toor 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) if test -z "$branch" set branch (fossil branch current) end set -l vcs 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 |