2012-10-16 09:45:46 +08:00
|
|
|
# name: Terlar
|
|
|
|
# author: terlar - https://github.com/terlar
|
|
|
|
|
2014-06-01 15:39:07 +08:00
|
|
|
set -g fish_color_user magenta
|
|
|
|
set -g fish_color_host yellow
|
2012-10-16 09:45:46 +08:00
|
|
|
|
|
|
|
function fish_prompt --description 'Write out the prompt'
|
|
|
|
set -l last_status $status
|
|
|
|
|
|
|
|
# User
|
|
|
|
set_color $fish_color_user
|
2012-10-19 07:04:59 +08:00
|
|
|
echo -n (whoami)
|
2012-10-16 09:45:46 +08:00
|
|
|
set_color normal
|
|
|
|
|
|
|
|
echo -n '@'
|
|
|
|
|
|
|
|
# Host
|
|
|
|
set_color $fish_color_host
|
2012-10-19 07:04:59 +08:00
|
|
|
echo -n (hostname -s)
|
2012-10-16 09:45:46 +08:00
|
|
|
set_color normal
|
|
|
|
|
|
|
|
echo -n ':'
|
|
|
|
|
|
|
|
# PWD
|
|
|
|
set_color $fish_color_cwd
|
2012-10-19 07:04:59 +08:00
|
|
|
echo -n (prompt_pwd)
|
2012-10-16 09:45:46 +08:00
|
|
|
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
|