2012-10-16 01:45:46 +00:00
|
|
|
# name: Terlar
|
|
|
|
# author: terlar - https://github.com/terlar
|
|
|
|
|
|
|
|
function fish_prompt --description 'Write out the prompt'
|
2016-11-02 02:19:45 +00:00
|
|
|
set -l last_status $status
|
2012-10-16 01:45:46 +00:00
|
|
|
|
2021-04-15 13:17:52 +00:00
|
|
|
prompt_login
|
2012-10-16 01:45:46 +00:00
|
|
|
|
2016-11-02 02:19:45 +00:00
|
|
|
echo -n ':'
|
2012-10-16 01:45:46 +00:00
|
|
|
|
2016-11-02 02:19:45 +00:00
|
|
|
# PWD
|
|
|
|
set_color $fish_color_cwd
|
|
|
|
echo -n (prompt_pwd)
|
|
|
|
set_color normal
|
2012-10-16 01:45:46 +00:00
|
|
|
|
2021-04-05 08:58:40 +00:00
|
|
|
set -q __fish_git_prompt_showdirtystate
|
|
|
|
or set -g __fish_git_prompt_showdirtystate 1
|
|
|
|
set -q __fish_git_prompt_showuntrackedfiles
|
|
|
|
or set -g __fish_git_prompt_showuntrackedfiles 1
|
|
|
|
set -q __fish_git_prompt_showcolorhints
|
|
|
|
or set -g __fish_git_prompt_showcolorhints 1
|
|
|
|
set -q __fish_git_prompt_color_untrackedfiles
|
|
|
|
or set -g __fish_git_prompt_color_untrackedfiles yellow
|
|
|
|
set -q __fish_git_prompt_char_untrackedfiles
|
|
|
|
or set -g __fish_git_prompt_char_untrackedfiles '?'
|
|
|
|
set -q __fish_git_prompt_color_invalidstate
|
|
|
|
or set -g __fish_git_prompt_color_invalidstate red
|
|
|
|
set -q __fish_git_prompt_char_invalidstate
|
|
|
|
or set -g __fish_git_prompt_char_invalidstate '!'
|
|
|
|
set -q __fish_git_prompt_color_dirtystate
|
|
|
|
or set -g __fish_git_prompt_color_dirtystate blue
|
|
|
|
set -q __fish_git_prompt_char_dirtystate
|
|
|
|
or set -g __fish_git_prompt_char_dirtystate '*'
|
|
|
|
set -q __fish_git_prompt_char_stagedstate
|
|
|
|
or set -g __fish_git_prompt_char_stagedstate '✚'
|
|
|
|
set -q __fish_git_prompt_color_cleanstate
|
|
|
|
or set -g __fish_git_prompt_color_cleanstate green
|
|
|
|
set -q __fish_git_prompt_char_cleanstate
|
|
|
|
or set -g __fish_git_prompt_char_cleanstate '✓'
|
|
|
|
set -q __fish_git_prompt_color_stagedstate
|
|
|
|
or set -g __fish_git_prompt_color_stagedstate yellow
|
|
|
|
set -q __fish_git_prompt_color_branch_dirty
|
|
|
|
or set -g __fish_git_prompt_color_branch_dirty red
|
|
|
|
set -q __fish_git_prompt_color_branch_staged
|
|
|
|
or set -g __fish_git_prompt_color_branch_staged yellow
|
|
|
|
set -q __fish_git_prompt_color_branch
|
|
|
|
or set -g __fish_git_prompt_color_branch green
|
|
|
|
set -q __fish_git_prompt_char_stateseparator
|
|
|
|
or set -g __fish_git_prompt_char_stateseparator '⚡'
|
2021-04-16 16:54:56 +00:00
|
|
|
fish_vcs_prompt '|%s'
|
2016-11-02 02:19:45 +00:00
|
|
|
echo
|
2012-10-16 01:45:46 +00:00
|
|
|
|
2016-11-02 02:19:45 +00:00
|
|
|
if not test $last_status -eq 0
|
|
|
|
set_color $fish_color_error
|
|
|
|
end
|
2012-10-16 01:45:46 +00:00
|
|
|
|
2016-11-02 02:19:45 +00:00
|
|
|
echo -n '➤ '
|
|
|
|
set_color normal
|
2012-10-16 01:45:46 +00:00
|
|
|
end
|