Fix fish prompt and misc bugs.

This commit is contained in:
2018-09-03 22:13:33 -04:00
parent f23f2ba454
commit 22a8c176d0
3 changed files with 20 additions and 34 deletions

View File

@@ -1,33 +1,31 @@
function fish_greeting
echo "Hello World"
end
# 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 '✗'
set __fish_git_prompt_char_stagedstate '→'
set __fish_git_prompt_char_untrackedfiles '☡'
set __fish_git_prompt_char_stashstate '↩'
set __fish_git_prompt_char_upstream_ahead '+'
set __fish_git_prompt_char_upstream_behind '-'
function fish_prompt
set last_status $status
set last_status $status
set_color $fish_color_cwd
printf '%s' (prompt_pwd)
set_color normal
set_color blue
printf '%s ' (date "+%H:%M:%S")
printf '%s ' (__fish_git_prompt)
set_color cyan
printf '%s' (prompt_pwd)
set_color normal
set_color normal
printf '%s ' (__fish_git_prompt)
if test $last_status -eq 0
set_color green
else
set_color red
end
printf '➤ '
set_color normal
end
# no startup message
function fish_greeting
end