function fish_prompt
# This prompt shows:
- # - green lines if the last return command is OK, red otherwise
+ # - white lines if the last return command is OK, red otherwise
# - your user name, in red if root or yellow otherwise
# - your hostname, in cyan if ssh or blue otherwise
# - the current path (with prompt_pwd)
# ╰─>$ echo there
set -l retc red
- test $status = 0; and set retc green
+ test $status = 0; and set retc white
set -q __fish_git_prompt_showupstream
or set -g __fish_git_prompt_showupstream auto
set_color normal
set_color $retc
echo -n '─'
- set_color -o green
+ set_color -o white
echo -n '['
set_color normal
test -n $field_name
and echo -n $field_name:
set_color $retc
echo -n $field_value
- set_color -o green
+ set_color -o white
echo -n ']'
end
set_color $retc
echo -n '┬─'
- set_color -o green
+ set_color -o white
echo -n [
if functions -q fish_is_root_user; and fish_is_root_user
echo -n (prompt_hostname)
set_color -o white
echo -n :(prompt_pwd)
- set_color -o green
+ set_color -o white
echo -n ']'
# Date
case default
set mode (set_color --bold red)N
case insert
- set mode (set_color --bold green)I
+ set mode (set_color --bold white)I
case replace_one
- set mode (set_color --bold green)R
+ set mode (set_color --bold white)R
echo '[R]'
case replace
set mode (set_color --bold cyan)R