Skip to content

Commit f2b0504

Browse files
committed
tmp
1 parent cbaac2e commit f2b0504

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/carapace-bridge/cmd/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func init() {
4343
addSubCommand("argcompleteV1", "bridges https://github.com/kislyuk/argcomplete", bridge.ActionArgcompleteV1)
4444
addSubCommand("aws", "bridges https://github.com/aws/aws-cli", bridge.ActionAws)
4545
addSubCommand("bash", "bridges completions registered in bash", bridge.ActionBash)
46+
addSubCommand("bridge", "", bridge.ActionBridge) // TODO description
4647
addSubCommand("carapace-bin", "bridges completions registered in carapace-bin", bridge.ActionCarapaceBin)
4748
addSubCommand("carapace", "bridges https://github.com/carapace-sh/carapace", bridge.ActionCarapace)
4849
addSubCommand("clap", "bridges https://github.com/clap-rs/clap", bridge.ActionClap)

pkg/actions/bridge/bridge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func ActionBridges(name string) carapace.Action {
116116
func ActionBridge(command ...string) carapace.Action {
117117
return actionCommand(command...)(func(command ...string) carapace.Action {
118118
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
119-
if choice, err := choices.Get(command[0]); err == nil && choice.Group == "bridge" {
119+
if choice, err := choices.Get(command[0]); err == nil && (choice.Group == "" || choice.Group == "bridge") {
120120
if action, ok := bridgeActions[choice.Variant]; ok {
121121
return action(command...)
122122
}

0 commit comments

Comments
 (0)