Files
Geoff dd3895ccbd Dotfiles commit (try to keep under 50 characters)
Multi-line description of commit,
feel free to be detailed.

[Ticket: X]
~
~
".git/COMMIT_EDITMSG" 14L, 297C
2026-05-05 10:37:59 +02:00

27 lines
861 B
Fish

function _pure_prompt_git \
--description 'Print git repository information: branch name, dirty, upstream ahead/behind'
set ABORT_FEATURE 2
if set --query pure_enable_git; and test "$pure_enable_git" != true
return
end
if not type -q --no-functions git # skip git-related features when `git` is not available
return $ABORT_FEATURE
end
set --local is_git_repository (command git rev-parse --is-inside-work-tree 2>/dev/null)
if test -n "$is_git_repository"
set --local git_prompt (_pure_prompt_git_branch)(_pure_prompt_git_dirty)(_pure_prompt_git_stash)
set --local git_pending_commits (_pure_prompt_git_pending_commits)
if test (_pure_string_width $git_pending_commits) -ne 0
set --append git_prompt $git_pending_commits
end
echo $git_prompt
end
end