Skip to content

Commit

Permalink
bridge: removed ActionPosener and fixed references
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Mar 6, 2023
1 parent 9d9356e commit e4e1765
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cmd/carapace/cmd/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func createCmd(command string, engine string) *cobra.Command {
case "fish":
return bridge.ActionFish(command)
case "posener":
return bridge.ActionPosener(command)
return bridge.ActionComplete(command)
default:
return carapace.ActionValues()
}
Expand Down
2 changes: 1 addition & 1 deletion completers/boundary_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ func init() {

carapace.Gen(rootCmd).PositionalAnyCompletion(
// TODO just bridging it for now
bridge.ActionPosener("boundary"),
bridge.ActionComplete("boundary"),
)
}
2 changes: 1 addition & 1 deletion completers/nomad_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ func init() {

carapace.Gen(rootCmd).PositionalAnyCompletion(
// TODO just bridging it for now
bridge.ActionPosener("nomad"),
bridge.ActionComplete("nomad"),
)
}
2 changes: 1 addition & 1 deletion completers/vault_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ func init() {

carapace.Gen(rootCmd).PositionalAnyCompletion(
// TODO just bridging it for now
bridge.ActionPosener("vault"),
bridge.ActionComplete("vault"),
)
}
2 changes: 1 addition & 1 deletion pkg/actions/bridge/argcomplete.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/rsteube/carapace"
)

// ActionArgcomplete bridges kislyuk/argcomplete
// ActionArgcomplete bridges https://github.com/kislyuk/argcomplete
//
// var rootCmd = &cobra.Command{
// Use: "az",
Expand Down
4 changes: 2 additions & 2 deletions pkg/actions/bridge/carapace.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/rsteube/carapace/pkg/xdg"
)

// ActionCarapace bridges rsteube/carapace completion
// ActionCarapace bridges https://github.com/rsteube/carapace
func ActionCarapace(cmd string) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
args := []string{"_carapace", "export", ""}
Expand All @@ -24,7 +24,7 @@ func ActionCarapace(cmd string) carapace.Action {
})
}

// ActionCarapaceBin bridges a completer provided by carapace-bin
// ActionCarapaceBin bridges completions registered in carapace-bin
func ActionCarapaceBin(completer string) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
if a, err := actionSpec(completer); err == nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/actions/bridge/cobra.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)

// ActionCobra bridges cobra completion
// ActionCobra bridges https://github.com/spf13/cobra
//
// var rootCmd = &cobra.Command{
// Use: "podman",
Expand Down
2 changes: 1 addition & 1 deletion pkg/actions/bridge/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/rsteube/carapace"
)

// ActionComplete bridges posener/complete
// ActionComplete bridges https://github.com/posener/complete
//
// var rootCmd = &cobra.Command{
// Use: "vault",
Expand Down
11 changes: 0 additions & 11 deletions pkg/actions/bridge/posener.go

This file was deleted.

0 comments on commit e4e1765

Please sign in to comment.