dotfiles/config/fish/functions/fish_prompt.fish

48 lines
1.1 KiB
Fish
Raw Normal View History

2018-06-09 22:17:36 +00:00
#!/usr/bin/fish
set normal (set_color normal)
set magenta (set_color magenta)
set yellow (set_color yellow)
set green (set_color green)
set red (set_color red)
set gray (set_color -o black)
# Fish git prompt
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_showstashstate 'yes'
set __fish_git_prompt_showuntrackedfiles 'yes'
set __fish_git_prompt_showupstream 'yes'
set __fish_git_prompt_color_branch yellow
set __fish_git_prompt_color_upstream_ahead green
set __fish_git_prompt_color_upstream_behind red
# Status Chars
#set __fish_git_prompt_char_dirtystate '⚡'
2018-06-09 22:42:20 +00:00
set __fish_git_prompt_char_dirtystate '+'
2018-06-09 22:17:36 +00:00
set __fish_git_prompt_char_stagedstate '→'
set __fish_git_prompt_char_untrackedfiles '☡'
set __fish_git_prompt_char_stashstate '↩'
2018-06-09 22:42:20 +00:00
set __fish_git_prompt_char_upstream_ahead '⇡ '
set __fish_git_prompt_char_upstream_behind '⇣ '
2018-06-09 22:17:36 +00:00
function fish_prompt
2018-06-09 22:42:20 +00:00
echo
2018-06-09 22:17:36 +00:00
set last_status $status
set_color -o $fish_color_cwd
2018-06-09 22:42:20 +00:00
echo -n $PWD | sed -e "s,^$HOME,~,"
2018-06-09 22:17:36 +00:00
set_color normal
printf '%s' (__fish_git_prompt)
set_color normal
2018-06-09 22:42:20 +00:00
echo
2018-08-28 21:54:25 +00:00
z --add "$PWD"
2018-06-09 22:42:20 +00:00
2018-11-23 12:59:09 +00:00
echo -n "\$ "
2018-06-09 22:17:36 +00:00
end