1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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 (fossil branch current 2>/dev/null)
if test -z "$branch"
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"
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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 (fossil branch current 2>/dev/null)
if test -z "$branch"
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"
|