12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- function fish_prompt --description 'Write out the prompt'
- set -l last_status $status
- # User
- set_color $fish_color_user
- echo -n (whoami)
- set_color normal
- echo -n '@'
- # Host
- set_color $fish_color_host
- echo -n (prompt_hostname)
- set_color normal
- echo -n ':'
- # PWD
- set_color $fish_color_cwd
- echo -n (prompt_pwd)
- set_color normal
- # Second line
- echo
- # Error status
- if not test $last_status -eq 0
- set_color $fish_color_error
- echo -n '!'
- echo -n $last_status
- set_color normal
- end
- # Purpose
- set -q FISH_SHELL_PURPOSE
- if test $status -eq 0
- set_color normal
- echo -n '['
- else
- set_color white
- echo -n '[fish'
- end
- set_color blue
- echo -n $FISH_SHELL_PURPOSE
- set_color normal
- # VCS
- __terlar_git_prompt
- __fish_hg_prompt
- echo
- # Color arrow with error
- if not test $last_status -eq 0
- set_color $fish_color_error
- end
- echo -n '➤ '
- set_color normal
- end
|