diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c808f7..07eb3c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Actively catching terminal resize +- Add command aliases [0.3.0]: https://github.com/skybet/cali/compare/v0.2.0...v0.3.0 ## [0.3.0] - 2018-06-04 diff --git a/command.go b/command.go index 5571a05..195229e 100644 --- a/command.go +++ b/command.go @@ -24,6 +24,11 @@ func (c *Command) SetLong(l string) { c.cobra.Long = l } +// SetAliases sets aliases for a command +func (c *Command) SetAliases(a []string) { + c.cobra.Aliases = a +} + // setPreRun sets the cobra.Command.PreRun function func (c *Command) setPreRun(f cobraFunc) { c.cobra.PreRun = f