Skip to content

Commit

Permalink
Fix argument completion
Browse files Browse the repository at this point in the history
  • Loading branch information
jgustie committed Nov 30, 2023
1 parent df39761 commit d80887d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func NewRootCommand(version, refspec, date string) *cobra.Command {
Version: version,
SilenceUsage: true,
TraverseChildren: true,
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{"yaml", "yml", "json"}, cobra.ShellCompDirectiveFilterFileExt
},
Annotations: map[string]string{
"BuildRefspec": refspec,
"BuildDate": date,
Expand Down

0 comments on commit d80887d

Please sign in to comment.