feat(cli): add aliases to commands

This commit is contained in:
Patryk Hegenberg 2025-01-23 07:59:26 +01:00
parent 53a50f2be4
commit 70dbc9e062
6 changed files with 20 additions and 27 deletions

View file

@ -12,10 +12,11 @@ import (
)
var updateCmd = &cobra.Command{
Use: "update [package_name]",
Short: "update a package with the specified package manager.",
Long: "update a package with the specified package manager.\nIf no package specified, all packages for the package manager will be updated",
Args: cobra.ExactArgs(1),
Use: "update [package_name]",
Short: "update a package with the specified package manager.",
Long: "update a package with the specified package manager.\nIf no package specified, all packages for the package manager will be updated",
Args: cobra.ExactArgs(1),
Aliases: []string{"u"},
Run: func(cmd *cobra.Command, args []string) {
packageName := args[0]
managerName, _ := cmd.Flags().GetString("manager")