Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Dec 19, 2023
1 parent 61a8f77 commit d3c98fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/carapace/cmd/action/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func ActionCompleters() carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
return carapace.ActionExecCommand("carapace", "--list")(func(output []byte) carapace.Action {
return carapace.ActionExecCommand("carapace", "--list", "--format", "json")(func(output []byte) carapace.Action {
var completers []struct {
Name string
Description string
Expand Down
11 changes: 6 additions & 5 deletions cmd/carapace/cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ var listCmd = &cobra.Command{
Use: "--list",
Short: "",
Run: func(cmd *cobra.Command, args []string) {
// case "json":
printCompletersJson()
// default:
// printCompleters()
// }
switch cmd.Flag("format").Value.String() {
case "json":
printCompletersJson()
default:
printCompleters()
}
},
}

Expand Down

0 comments on commit d3c98fa

Please sign in to comment.