feat: rename create and delete commands to add and del
This commit is contained in:
@@ -38,8 +38,8 @@ var aliasCmd = &cobra.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var aliasDeleteCmd = &cobra.Command{
|
||||
Use: "delete <name>", Short: "Delete an alias", Args: cobra.ExactArgs(1),
|
||||
var aliasDelCmd = &cobra.Command{
|
||||
Use: "del <name>", Short: "Delete an alias", Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := cfg.DeleteAlias(args[0]); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
@@ -51,6 +51,6 @@ var aliasDeleteCmd = &cobra.Command{
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(aliasCmd)
|
||||
aliasCmd.AddCommand(aliasDeleteCmd)
|
||||
aliasCmd.AddCommand(aliasDelCmd)
|
||||
aliasCmd.Flags().StringVar(&aliasDesc, "desc", "", "description for the alias")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user