function fish_prompt -d "Write out the prompt" # set last return status set --local st $status if math "$st > 0" > /dev/null printf "%s⤷ %s%d%s\n" (set_color white) (set_color red) $st (set_color normal) end set -l DIR (prompt_pwd) if test $TERM = screen echo -ne "\033k$DIR\033\\" end printf '%s%s%s%s%s' $fish_prompt[1] $USER $fish_prompt[2] $DIR $fish_prompt[3] end