Skip to content

Commit

Permalink
chore(cmd): Add "get stream" subcommand completion
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Sep 3, 2024
1 parent bee9af3 commit c25b31b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/get/stream/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ func NewCommand(opts ...util.Option) *cobra.Command {

PreRunE: preRun,
RunE: run,

Args: cobra.MaximumNArgs(1),
ValidArgsFunction: func(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) {
var completion []string
if len(args) == 0 {
completion = []string{"count"}
}
return completion, cobra.ShellCompDirectiveNoFileComp
},
}

cmd.Flags().StringP("count", "c", "", "Gets stream count (active, total)")
Expand Down

0 comments on commit c25b31b

Please sign in to comment.