feat(aliases): add aliases for route command

- `r` is alias for `route` command
- `ls`, or `show` is alias for `list` subcommand
This commit is contained in:
zakaria 2022-03-02 14:20:04 +10:00
parent dec4ee5f73
commit dbb2af0238

View File

@ -35,13 +35,15 @@ func init() {
}
var routesCmd = &cobra.Command{
Use: "routes",
Short: "Manage the routes of Headscale",
Use: "routes",
Short: "Manage the routes of Headscale",
Aliases: []string{"r", "route"},
}
var listRoutesCmd = &cobra.Command{
Use: "list",
Short: "List routes advertised and enabled by a given node",
Use: "list",
Short: "List routes advertised and enabled by a given node",
Aliases: []string{"ls", "show"},
Run: func(cmd *cobra.Command, args []string) {
output, _ := cmd.Flags().GetString("output")