Skip to content

Instantly share code, notes, and snippets.

@demacdolincoln
Last active March 25, 2021 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save demacdolincoln/2261e13c3dddd2290fe5 to your computer and use it in GitHub Desktop.
Save demacdolincoln/2261e13c3dddd2290fe5 to your computer and use it in GitHub Desktop.
function fish_prompt
###################################################################
# cuidando das variaveis de ambiente #
###################################################################
set -g VIRTUAL_ENV_DISABLE_PROMPT true # para nao aparecer a notificacao padrao do venv e do virtualenv
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_hide_untrackedfiles 1
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 "x"
set -g __fish_git_prompt_char_cleanstate "✔"
set -g __fish_git_prompt_color_branch BC5
set -g __fish_git_prompt_color_flags BC5 # as infos do git
# prefix e suffix : o que vem antes e depois do status do git
set -g __fish_git_prompt_color_suffix 0FA
set -g __fish_git_prompt_color_prefix 0FA
###################################################################
# organizando o prompt #
###################################################################
set_color $fish_color_param
printf '(%s)' (whoami)
set_color normal
printf ' ∴ '
set_color $fish_color_param
printf '(%s)' (hostname|cut -d . -f 1)
set_color normal
printf ' ∴ '
set_color 0CC
printf '(%s)' (prompt_pwd)
__fish_git_prompt
set_color normal
# Line 2
echo
if test $VIRTUAL_ENV
printf "{%s} " (set_color BC5)(basename $VIRTUAL_ENV)(set_color normal)
end
printf '➤ '
set_color normal
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment