wwctl image completions and arguments

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-02-08 14:52:48 -07:00
parent 1d34477425
commit 5494424c09
14 changed files with 59 additions and 55 deletions

View File

@@ -2,6 +2,7 @@ package list
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
type variables struct {
@@ -22,6 +23,7 @@ func GetCommand() *cobra.Command {
Long: "This command will show you the images that are imported into Warewulf.",
RunE: CobraRunE(&vars),
Aliases: []string{"ls"},
ValidArgsFunction: completions.Images(0), // no limit
}
baseCmd.PersistentFlags().BoolVarP(&vars.full, "long", "l", false, "show all")
baseCmd.PersistentFlags().BoolVarP(&vars.kernel, "kernel", "k", false, "show kernel version")