a fish shell transient prompt
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

init

+34
+34
functions/fish_prompt.fish
··· 1 + if ! set -q prompt_symbol 2 + set -g prompt_symbol "→" 3 + end 4 + 5 + if ! set -q prompt_symbol_color 6 + set -g prompt_symbol_color normal 7 + end 8 + 9 + function fish_prompt 10 + set -l last_status $status 11 + 12 + set -l stat 13 + if contains -- --final-rendering $argv 14 + set stat (set_color --dim)(prompt_pwd)(set_color normal) 15 + else 16 + set stat (set_color $fish_color_cwd)(prompt_pwd -D 999)(set_color normal) 17 + end 18 + 19 + set -l error 20 + if test $last_status -ne 0 21 + set error (set_color $fish_color_error)"[$last_status]"(set_color normal) 22 + end 23 + 24 + set -l symbol (set_color $prompt_symbol_color)$prompt_symbol(set_color normal) 25 + 26 + if contains -- --final-rendering $argv 27 + string join ' ' -- $base $stat $symbol '' 28 + return 29 + else 30 + echo '' 31 + echo $stat 32 + string join ' ' -- $error $symbol '' 33 + end 34 + end