From dbb2af0238161ed4cbdf3096fc893910bb1bbfbe Mon Sep 17 00:00:00 2001 From: zakaria Date: Wed, 2 Mar 2022 14:20:04 +1000 Subject: [PATCH] feat(aliases): add aliases for `route` command - `r` is alias for `route` command - `ls`, or `show` is alias for `list` subcommand --- cmd/headscale/cli/routes.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/headscale/cli/routes.go b/cmd/headscale/cli/routes.go index ced1a0bf..dc060fba 100644 --- a/cmd/headscale/cli/routes.go +++ b/cmd/headscale/cli/routes.go @@ -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")