Skip to content

Commit 7a2cd1c

Browse files
authored
Merge pull request #290 from carapace-sh/add-get
added Get to access bridge by name
2 parents 65844bc + ae16807 commit 7a2cd1c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pkg/actions/bridge/bridge.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ import (
1111
var bridgeActions = map[string]func(command ...string) carapace.Action{
1212
"argcomplete": ActionArgcomplete,
1313
"argcomplete@v1": ActionArgcompleteV1,
14+
"aws": ActionAws,
1415
"bash": ActionBash,
1516
"carapace": ActionCarapace,
17+
"carapace-bin": ActionCarapaceBin,
1618
"clap": ActionClap,
1719
"click": ActionClick,
1820
"cobra": ActionCobra,
1921
"complete": ActionComplete,
2022
"fish": ActionFish,
23+
"gcloud": ActionGcloud,
2124
"inshellisense": ActionInshellisense,
2225
"kingpin": ActionKingpin,
2326
"kitten": ActionKitten,
@@ -28,6 +31,12 @@ var bridgeActions = map[string]func(command ...string) carapace.Action{
2831
"zsh": ActionZsh,
2932
}
3033

34+
// TODO experimental
35+
func Get(name string) (func(command ...string) carapace.Action, bool) {
36+
a, ok := bridgeActions[name]
37+
return a, ok
38+
}
39+
3140
// Bridges bridges completions as defined in bridges.yaml and CARAPACE_BRIDGE environment variable
3241
func ActionBridges(command ...string) carapace.Action {
3342
return actionCommand(command...)(func(command ...string) carapace.Action {

0 commit comments

Comments
 (0)