@@ -73,6 +73,10 @@ var regRefCmd = &cobra.Command{
7373 Aliases : []string {"ref" , "r" },
7474 Short : "Display image reference" ,
7575 Long : header + "\n Display image reference" ,
76+ Args : cobra .ExactArgs (1 ),
77+ ValidArgsFunction : func (cmd * cobra.Command , args []string , toComplete string ) ([]string , cobra.ShellCompDirective ) {
78+ return tools .GetNames (), cobra .ShellCompDirectiveNoFileComp
79+ },
7680 RunE : func (cmd * cobra.Command , args []string ) error {
7781 fmt .Println (buildReference (args [0 ]))
7882
@@ -85,6 +89,10 @@ var regIndexCmd = &cobra.Command{
8589 Aliases : []string {"i" },
8690 Short : "Display image index" ,
8791 Long : header + "\n Display image index" ,
92+ Args : cobra .ExactArgs (1 ),
93+ ValidArgsFunction : func (cmd * cobra.Command , args []string , toComplete string ) ([]string , cobra.ShellCompDirective ) {
94+ return tools .GetNames (), cobra .ShellCompDirectiveNoFileComp
95+ },
8896 RunE : func (cmd * cobra.Command , args []string ) error {
8997 format := getFormatString ()
9098
0 commit comments