mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 07:35:35 +08:00
f56f84c6ac
- Remove useless comment, because multi-line prompt works good now.
39 lines
623 B
Fish
39 lines
623 B
Fish
# name: Terlar
|
|
# author: terlar - https://github.com/terlar
|
|
|
|
set -xg fish_color_user magenta
|
|
set -xg fish_color_host yellow
|
|
|
|
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 (hostname -s)
|
|
set_color normal
|
|
|
|
echo -n ':'
|
|
|
|
# PWD
|
|
set_color $fish_color_cwd
|
|
echo -n (prompt_pwd)
|
|
set_color normal
|
|
|
|
__terlar_git_prompt
|
|
echo
|
|
|
|
if not test $last_status -eq 0
|
|
set_color $fish_color_error
|
|
end
|
|
|
|
echo -n '➤ '
|
|
set_color normal
|
|
end
|