From 8f85cdbf22434ad0876adc515d98007c5d9ce8c4 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 23 Jan 2026 10:13:55 -0800 Subject: [PATCH] git: add completion for `branch -D` Also allow multiple branches to be autocompleted Fixes https://github.com/nushell/nu_scripts/issues/1208 --- custom-completions/git/git-completions.nu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom-completions/git/git-completions.nu b/custom-completions/git/git-completions.nu index adf6af84..dd8db204 100644 --- a/custom-completions/git/git-completions.nu +++ b/custom-completions/git/git-completions.nu @@ -531,7 +531,7 @@ export extern "git merge" [ # List or change branches export extern "git branch" [ - branch?: string@"nu-complete git local branches" # name of branch to operate on + ...branch: string@"nu-complete git local branches" # name of branch (or branches) to operate on --abbrev # use short commit hash prefixes --edit-description # open editor to edit branch description --merged # list reachable branches @@ -548,6 +548,7 @@ export extern "git branch" [ --color # use color in output --quiet # suppress messages except errors --delete(-d) # delete branch + -D # force delete branch --list # list branches --contains: string@"nu-complete git commits all" # show only branches that contain the specified commit --no-contains # show only branches that don't contain specified commit