summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2023-01-21 19:21:30 -0800
committerBart Schaefer <schaefer@zsh.org>2023-01-21 19:21:30 -0800
commit37569049f092a841047413709cd39b2480211ecc (patch)
tree41046d4f2f4deddb9451a6f486dd896fd46cf9d1 /Completion/Unix/Command
parentf93ad02b94bd18c96a0861506127e3a246fb8eec (diff)
downloadzsh-37569049f092a841047413709cd39b2480211ecc.tar.gz
zsh-37569049f092a841047413709cd39b2480211ecc.zip
51313: fix "git rerere forget" completion
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_git6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 14fa01436..b3ed7b5c8 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4259,14 +4259,14 @@ _git-rerere () {
_arguments -C -S -s $endopt \
'--rerere-autoupdate[register clean resolutions in index]' \
- ': :->command' && ret=0
+ ': :->command' \
+ '*: :{ [[ $words[CURRENT-1] = forget ]] && __git_cached_files }' && ret=0
case $state in
(command)
- # TODO: This isn't optimal, as forget get confused.
_values command \
'clear[reset metadata used by rerere]' \
- 'forget[resets metadata used by rerere for specific conflict]: :__git_cached_files' \
+ 'forget[resets metadata used by rerere for specific conflict]' \
'diff[output diffs for the current state of the resolution]' \
'status[print paths with conflicts whose merge resolution rerere will record]' \
'remaining[print paths with conflicts that have not been autoresolved by rerere]' \