mkideal/cli

Command alias

suntong opened this issue · 4 comments

Is there a way to register/provide shorter alias names to command, like npm i stands for npm install?

Use Aliases as following

Command{
    Name: "remove",
    Aliases: []string{"rm"},
    Fn: doSomething,
}

Thanks @mkideal

Commands:

  help    display help information
  child   this is a child command(aliases cd,cld)

There is better a space before the "(". OK I send in PR for it?

Thanks. Done.