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 a14f9a4 commit 48c720e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/carapace/cmd/macros.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions"
spec "github.com/rsteube/carapace-spec"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -44,6 +45,9 @@ func init() {
}
return carapace.ActionValuesDescribed(vals...).Invoke(carapace.Context{}).ToMultiPartsA(".")
}),
carapace.ActionCallback(func(c carapace.Context) carapace.Action {
return spec.ActionMacro(c.Args[0])
}),
)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/carapace/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func init() {
case "-v", "--version":
return carapace.ActionValues()
case "--list":
return carapace.ActionExecute(listCmd).Shift(1)
return carapace.ActionExecute(listCmd).Shift(1).Usage("list")
case "--run":
return carapace.ActionExecute(runCmd).Shift(1)
case "--schema":
Expand Down

0 comments on commit 48c720e

Please sign in to comment.