Skip to content

Commit

Permalink
Merge pull request #90 from rsteube/rm-usage
Browse files Browse the repository at this point in the history
clear usage for bridged completion
  • Loading branch information
rsteube committed Mar 30, 2023
2 parents cef8f10 + 8fa7dbe commit 13db767
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/carapace-bridge/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func addSubCommand(use, short string, f func(s ...string) carapace.Action) {
// TODO remove/prevent help flag
carapace.Gen(cmd).Standalone()

carapace.Gen(cmd).PreRun(func(cmd *cobra.Command, args []string) {
cmd.Use = strings.SplitN(cmd.Use, " ", 2)[0]
})

rootCmd.AddCommand(cmd)

carapace.Gen(cmd).PositionalCompletion(
Expand Down

0 comments on commit 13db767

Please sign in to comment.