From 8bc016aef39a4cd5737d1240398f5de528a0962b Mon Sep 17 00:00:00 2001 From: rsteube Date: Tue, 9 Jan 2024 12:52:11 +0100 Subject: [PATCH] git: bisect start - dash completion --- completers/git_completer/cmd/bisect_start.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/completers/git_completer/cmd/bisect_start.go b/completers/git_completer/cmd/bisect_start.go index 53b78edbca..aa5d086e30 100644 --- a/completers/git_completer/cmd/bisect_start.go +++ b/completers/git_completer/cmd/bisect_start.go @@ -31,4 +31,13 @@ func init() { return git.ActionRefs(git.RefOption{}.Default()) }), ) + + carapace.Gen(bisect_startCmd).DashAnyCompletion( + carapace.ActionCallback(func(c carapace.Context) carapace.Action { + if bisect_startCmd.Flags().ArgsLenAtDash() == 0 { + return carapace.ActionValues() + } + return git.ActionRefFiles(bisect_startCmd.Flags().Args()[0]).FilterArgs() + }), + ) }