Skip to content

Instantly share code, notes, and snippets.

@junderhill
Forked from joshuacrass/fish_prompt.fish
Created July 4, 2019 09:54
Show Gist options
  • Save junderhill/f5a98afc646f539f483e4efefdaffe3e to your computer and use it in GitHub Desktop.
Save junderhill/f5a98afc646f539f483e4efefdaffe3e to your computer and use it in GitHub Desktop.
Customized fish prompt for a better Git experience
# Options
set __fish_git_prompt_show_informative_status
set __fish_git_prompt_showcolorhints
set __fish_git_prompt_showupstream "informative"
# Colors
set green (set_color green)
set magenta (set_color magenta)
set normal (set_color normal)
set red (set_color red)
set yellow (set_color yellow)
set __fish_git_prompt_color_branch magenta --bold
set __fish_git_prompt_color_dirtystate white
set __fish_git_prompt_color_invalidstate red
set __fish_git_prompt_color_merging yellow
set __fish_git_prompt_color_stagedstate yellow
set __fish_git_prompt_color_upstream_ahead green
set __fish_git_prompt_color_upstream_behind red
# Icons
set __fish_git_prompt_char_cleanstate ' ๐Ÿ‘ '
set __fish_git_prompt_char_conflictedstate ' โš ๏ธ '
set __fish_git_prompt_char_dirtystate ' ๐Ÿ’ฉ '
set __fish_git_prompt_char_invalidstate ' ๐Ÿคฎ '
set __fish_git_prompt_char_stagedstate ' ๐Ÿšฅ '
set __fish_git_prompt_char_stashstate ' ๐Ÿ“ฆ '
set __fish_git_prompt_char_stateseparator ' | '
set __fish_git_prompt_char_untrackedfiles ' ๐Ÿ” '
set __fish_git_prompt_char_upstream_ahead ' โ˜๏ธ '
set __fish_git_prompt_char_upstream_behind ' ๐Ÿ‘‡ '
set __fish_git_prompt_char_upstream_diverged ' ๐Ÿšง '
set __fish_git_prompt_char_upstream_equal ' ๐Ÿ’ฏ '
function fish_prompt
set last_status $status
set_color $fish_color_cwd
printf '%s' (prompt_pwd)
set_color normal
printf '%s ' (__fish_git_prompt)
echo -n "๐Ÿ  "
set_color normal
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment