Compare commits

..
Author SHA1 Message Date
02e5c89d20 feat(git): add gan and ganpa aliases for git add --intent-to-add
`gapa` only offers hunks from tracked files. `ganpa` marks untracked
files with intent-to-add first, so new files show up in the patch
prompt too. It needs the `.` pathspec, since `git add --intent-to-add`
with no path adds nothing.

Reapplies #13609, with the pathspec fix from review.

Co-Authored-By: Charles Dunda <241828233+cdunda-perchwell@users.noreply.github.com>
Co-Authored-By: Karl Horky <1935696+karlhorky@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:37:56 -08:00
4 changed files with 8 additions and 5 deletions

No files matched your search

+3 -4
View File
@@ -237,10 +237,9 @@ function _omz_diag_dump_one_big_text() {
fi
builtin echo
builtin echo "Zsh compdump files:"
local dumpfile
local -U dumpfiles
dumpfiles=( $zdotdir/.zcompdump*(N) ${ZSH_COMPDUMP:h}/.zcompdump*(N) )
(( $#dumpfiles )) && command ls -lad $dumpfiles
local dumpfile dumpfiles
command ls -lad $zdotdir/.zcompdump*
dumpfiles=( $zdotdir/.zcompdump*(N) )
if [[ $verbose -ge 2 ]]; then
for dumpfile in $dumpfiles; do
_omz_diag_dump_echo_file_w_header $dumpfile
+1 -1
View File
@@ -128,7 +128,7 @@ fi
# Save the location of the current completion dump file.
if [[ -z "$ZSH_COMPDUMP" ]]; then
ZSH_COMPDUMP="${ZSH_CACHE_DIR}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
ZSH_COMPDUMP="${ZDOTDIR:-$HOME}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
fi
# Resolve the commit $ZSH is checked out at into $REPLY by reading the git
+2
View File
@@ -18,6 +18,8 @@ plugins=(... git)
| `g` | `git` |
| `ga` | `git add` |
| `gaa` | `git add --all` |
| `gan` | `git add --intent-to-add` |
| `ganpa` | `git add --intent-to-add . && git add --patch` |
| `gapa` | `git add --patch` |
| `gau` | `git add --update` |
| `gav` | `git add --verbose` |
+2
View File
@@ -116,6 +116,8 @@ alias ggpur='ggu'
alias g='git'
alias ga='git add'
alias gaa='git add --all'
alias gan='git add --intent-to-add'
alias ganpa='git add --intent-to-add . && git add --patch'
alias gapa='git add --patch'
alias gau='git add --update'
alias gav='git add --verbose'