Skip to content

Commit c9b8a0c

Browse files
committed
fix(completions): generate clean force flags
1 parent aa8ed3d commit c9b8a0c

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

scripts/generate-completions.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ MIDDLE1
176176
;;
177177
clean)
178178
if [[ "$cur" == -* ]]; then
179-
COMPREPLY=($(compgen -W "--merged --yes -y --dry-run -n" -- "$cur"))
179+
COMPREPLY=($(compgen -W "--merged --yes -y --dry-run -n --force -f" -- "$cur"))
180180
fi
181181
;;
182182
copy)
@@ -342,7 +342,9 @@ _git-gtr() {
342342
'--yes[Skip confirmation prompts]' \
343343
'-y[Skip confirmation prompts]' \
344344
'--dry-run[Show what would be removed]' \
345-
'-n[Show what would be removed]'
345+
'-n[Show what would be removed]' \
346+
'--force[Force removal even if worktree has uncommitted changes or untracked files]' \
347+
'-f[Force removal even if worktree has uncommitted changes or untracked files]'
346348
return
347349
fi
348350
@@ -396,7 +398,7 @@ MIDDLE1
396398
rm)
397399
_arguments \
398400
'--delete-branch[Delete branch]' \
399-
'--force[Force removal even if dirty]' \
401+
'--force[Force removal even if worktree has uncommitted changes or untracked files]' \
400402
'--yes[Non-interactive mode]'
401403
;;
402404
mv|rename)
@@ -546,7 +548,7 @@ complete -c git -n '__fish_git_gtr_using_command new' -s a -l ai -d 'Start AI to
546548
547549
# Remove command options
548550
complete -c git -n '__fish_git_gtr_using_command rm' -l delete-branch -d 'Delete branch'
549-
complete -c git -n '__fish_git_gtr_using_command rm' -l force -d 'Force removal even if dirty'
551+
complete -c git -n '__fish_git_gtr_using_command rm' -l force -d 'Force removal even if worktree has uncommitted changes or untracked files'
550552
complete -c git -n '__fish_git_gtr_using_command rm' -l yes -d 'Non-interactive mode'
551553
552554
# Rename command options
@@ -580,6 +582,7 @@ complete -c git -n '__fish_git_gtr_using_command clean' -l yes -d 'Skip confirma
580582
complete -c git -n '__fish_git_gtr_using_command clean' -s y -d 'Skip confirmation prompts'
581583
complete -c git -n '__fish_git_gtr_using_command clean' -l dry-run -d 'Show what would be removed'
582584
complete -c git -n '__fish_git_gtr_using_command clean' -s n -d 'Show what would be removed'
585+
complete -c git -n '__fish_git_gtr_using_command clean' -s f -l force -d 'Force removal even if worktree has uncommitted changes or untracked files'
583586
584587
# Config command
585588
complete -f -c git -n '__fish_git_gtr_using_command config' -a 'list get set add unset'

0 commit comments

Comments
 (0)