function fish_prompt set -l __last_command_exit_status $status set -l cyan (set_color -o cyan) set -l red (set_color -o red) set -l green (set_color -o green) set -l normal (set_color normal) set -l marker_color "$green" if test $__last_command_exit_status != 0 set marker_color "$red" end set -l marker "$marker_color" "δ" if fish_is_root_user set marker "$marker_color# " end set -l cwd $cyan (string join / (string split -r -m3 / (prompt_pwd))[-3..-1]) echo -n -s $marker ' ' $cwd $normal ' ' end