Add Command.Aliases and deprecate Command.ShortName

`Aliases` will be more flexible while still allowing "ShortName"
behaviour via `Aliases`.
This commit is contained in:
jszwedko
2015-03-09 21:24:57 -07:00
parent 3e0905345c
commit bf65971a6a
7 changed files with 75 additions and 71 deletions

View File

@@ -17,7 +17,7 @@ func TestCommandDoNotIgnoreFlags(t *testing.T) {
command := cli.Command{
Name: "test-cmd",
ShortName: "tc",
Aliases: []string{"tc"},
Usage: "this is for testing",
Description: "testing",
Action: func(_ *cli.Context) {},
@@ -37,7 +37,7 @@ func TestCommandIgnoreFlags(t *testing.T) {
command := cli.Command{
Name: "test-cmd",
ShortName: "tc",
Aliases: []string{"tc"},
Usage: "this is for testing",
Description: "testing",
Action: func(_ *cli.Context) {},