Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added flag when stash > 0 #53

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fish_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ __pure_set_default pure_symbol_git_down_arrow "⇣"
__pure_set_default pure_symbol_git_up_arrow "⇡"
__pure_set_default pure_symbol_git_dirty "*"
__pure_set_default pure_symbol_horizontal_bar "—"
__pure_set_default pure_symbol_stash "⚑"

# Colors

Expand Down Expand Up @@ -124,8 +125,13 @@ function fish_prompt
end
end

# show git stash
if test (count (command git stash list --no-decorate ^/dev/null)) != 0
set git_stash $pure_symbol_stash
end

# Format Git prompt output
set prompt $prompt "$pure_color_gray$git_branch_name$git_dirty$pure_color_normal$pure_color_cyan$git_arrows$pure_color_normal "
set prompt $prompt "$pure_color_gray$git_branch_name$git_dirty$pure_color_normal$pure_color_cyan$git_arrows$pure_color_cyan$git_stash$pure_color_normal "
end

if test $pure_user_host_location -ne 1
Expand Down