mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 17:41:12 -03:00
Rebuild terlar git prompt as a configuration for fish_git_prompt
This removes the awkward secondary logic. Note that we still ship a function called `__terlar_git_prompt` because people who picked the prompt will still be calling it - we don't update the prompt.
This commit is contained in:
committed by
Fabian Boehm
parent
3552a11afa
commit
8af2f96b4f
@@ -13,8 +13,41 @@ function fish_prompt --description 'Write out the prompt'
|
||||
echo -n (prompt_pwd)
|
||||
set_color normal
|
||||
|
||||
__terlar_git_prompt
|
||||
fish_hg_prompt
|
||||
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 '⚡'
|
||||
fish_vcs_prompt
|
||||
echo
|
||||
|
||||
if not test $last_status -eq 0
|
||||
|
||||
Reference in New Issue
Block a user