mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 23:21:15 -03:00
Use tabs, sample prompt
This commit is contained in:
47
share/tools/web_config/sample_prompts/informative_git.fish
Normal file
47
share/tools/web_config/sample_prompts/informative_git.fish
Normal file
@@ -0,0 +1,47 @@
|
||||
# name: Informative Git Prompt
|
||||
# author: Mariusz Smykula <mariuszs at gmail.com>
|
||||
|
||||
set -g __fish_git_prompt_show_status 1
|
||||
set -g __fish_git_prompt_hide_untrackedfiles 1
|
||||
|
||||
set -g __fish_git_prompt_color_branch magenta
|
||||
set -g __fish_git_prompt_showupstream "informative"
|
||||
set -g __fish_git_prompt_char_upstream_ahead "↑"
|
||||
set -g __fish_git_prompt_char_upstream_behind "↓"
|
||||
set -g __fish_git_prompt_char_upstream_prefix ""
|
||||
|
||||
set -g __fish_git_prompt_char_stagedstate "●"
|
||||
set -g __fish_git_prompt_char_dirtystate "✚"
|
||||
set -g __fish_git_prompt_char_untrackedfiles "…"
|
||||
set -g __fish_git_prompt_char_conflictedstate "✖"
|
||||
set -g __fish_git_prompt_char_cleanstate "✔"
|
||||
|
||||
set -g __fish_git_prompt_color_dirtystate blue
|
||||
set -g __fish_git_prompt_color_stagedstate yellow
|
||||
set -g __fish_git_prompt_color_invalidstate red
|
||||
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
|
||||
set -g __fish_git_prompt_color_cleanstate green
|
||||
|
||||
|
||||
function fish_prompt --description 'Write out the prompt'
|
||||
|
||||
set -l last_status $status
|
||||
|
||||
if not set -q __fish_prompt_normal
|
||||
set -g __fish_prompt_normal (set_color normal)
|
||||
end
|
||||
|
||||
# PWD
|
||||
set_color $fish_color_cwd
|
||||
echo -n (prompt_pwd)
|
||||
set_color normal
|
||||
|
||||
printf '%s ' (__fish_git_prompt)
|
||||
|
||||
if not test $last_status -eq 0
|
||||
set_color $fish_color_error
|
||||
end
|
||||
|
||||
echo -n '$ '
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user