function fish_prompt --description 'Write out the prompt' # Save status code for previous command set -l last_status $status # Print working directory set_color $fish_color_cwd echo -n (prompt_pwd) set_color normal # Print Git information fish_prompt_git_settings printf '%s ' (__fish_git_prompt) # Print status code for previous command, if nonzero if not test $last_status -eq 0 set_color $fish_color_error echo -n "[$last_status] " set_color normal end # Print the final character (ยง) echo -n "> " end