Skip to content

Instantly share code, notes, and snippets.

@ggrumbley
Last active January 2, 2019 21:47
Show Gist options
  • Save ggrumbley/eecc7ad12e7a4aebe7f3580a17e94f93 to your computer and use it in GitHub Desktop.
Save ggrumbley/eecc7ad12e7a4aebe7f3580a17e94f93 to your computer and use it in GitHub Desktop.
My Tweaked Sorin Prompt
function fish_prompt
test $SSH_TTY
and printf (set_color red)$USER(set_color brwhite)'@'(set_color yellow)(prompt_hostname)' '
test "$USER" = 'root'
and echo (set_color red)"#"
# Main
echo -n (set_color red)'λ' (set_color cyan)(prompt_pwd) (set_color red)'❯'(set_color yellow)'❯'(set_color green)'❯ '
end
# 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 cyan (set_color cyan)
set __fish_git_prompt_color_branch yellow
set __fish_git_prompt_color_suffix cyan
set __fish_git_prompt_color_prefix cyan
set __fish_git_prompt_color_bare cyan
set __fish_git_prompt_color_upstream cyan
set __fish_git_prompt_color_stateseparator cyan
set __fish_git_prompt_color_dirtystate magenta
set __fish_git_prompt_color_cleanstate green
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_stateseparator ' | '
# 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_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
echo -n $red'λ '
set_color normal
printf '%s' $cyan(prompt_pwd)
set_color normal
printf '%s'$cyan(__fish_git_prompt)
echo -n $red' ❯'$yellow'❯'$green'❯ '
set_color normal
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment