Simplify node, profile, and image completions
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -12,9 +12,14 @@ var (
|
||||
Short: "Show root fs dir for image",
|
||||
Long: `Shows the base directory for the chroot of the given image.
|
||||
More information about the image can be shown with the '-a' option.`,
|
||||
RunE: CobraRunE,
|
||||
ValidArgsFunction: completions.Images(0), // no limit
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: CobraRunE,
|
||||
Args: cobra.ExactArgs(1),
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
if len(args) == 0 {
|
||||
return completions.Images(cmd, args, toComplete)
|
||||
}
|
||||
return completions.None(cmd, args, toComplete)
|
||||
},
|
||||
}
|
||||
ShowAll bool
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user