wwctl completions for no args

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-02-09 15:28:30 -07:00
parent 760b6e5217
commit 65f85a00a3
11 changed files with 67 additions and 35 deletions

View File

@@ -1,15 +1,19 @@
package version
import "github.com/spf13/cobra"
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
var (
baseCmd = &cobra.Command{
Use: "version",
Short: "Version information",
Long: "This command will print the Warewulf version.",
RunE: CobraRunE,
Args: cobra.ExactArgs(0),
Aliases: []string{"vers"},
Use: "version",
Short: "Version information",
Long: "This command will print the Warewulf version.",
RunE: CobraRunE,
Args: cobra.NoArgs,
Aliases: []string{"vers"},
ValidArgsFunction: completions.None,
}
ListFull bool
)