migrate to dotter

This commit is contained in:
Alexander Navarro 2025-09-01 12:10:36 -04:00
parent c5618f2f2c
commit 23b6c0a596
265 changed files with 62 additions and 3125 deletions

View file

@ -0,0 +1,26 @@
function _pure_prompt_git \
--description 'Print git repository informations: 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