added more aliases for wwctl commands

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2024-03-18 14:41:18 +01:00
committed by Jonathon Anderson
parent 2805122c12
commit 17a5aaefee
15 changed files with 17 additions and 5 deletions

View File

@@ -29,6 +29,7 @@ func GetCommand() *cobra.Command {
Use: "add [OPTIONS] NODENAME",
Short: "Add new node to Warewulf",
Long: "This command will add a new node named NODENAME to Warewulf.",
Aliases: []string{"new", "create"},
RunE: CobraRunE(&vars),
Args: cobra.MinimumNArgs(1),
}

View File

@@ -13,7 +13,7 @@ var (
Long: "This command will remove NODE(s) from the Warewulf node configuration.",
Args: cobra.MinimumNArgs(1),
RunE: CobraRunE,
Aliases: []string{"rm", "del"},
Aliases: []string{"rm", "del", "remove"},
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if len(args) != 0 {
return nil, cobra.ShellCompDirectiveNoFileComp

View File

@@ -34,6 +34,7 @@ func GetCommand() *cobra.Command {
Use: "set [OPTIONS] PATTERN [PATTERN ...]",
Short: "Configure node properties",
Long: "This command sets configuration properties for nodes matching PATTERN.\n\nNote: use the string 'UNSET' to remove a configuration",
Aliases: []string{"modify"},
Args: cobra.MinimumNArgs(0),
RunE: CobraRunE(&vars),
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {