Add tctl windows_desktops as the default and keep tctl desktops as an alias (#18769)

Before this commit, users would `tctl get windows_desktop/<name>` and
`tctl desktops ls`. For consistency, `tctl windows_desktops ls` is now
the default but `tctl desktops ls` is kept as an alias for backwards
compatibility.
This commit is contained in:
Vitor Enes 2022-11-28 17:57:14 +00:00 committed by GitHub
parent e58078054e
commit 3031147920
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ type DesktopCommand struct {
func (c *DesktopCommand) Initialize(app *kingpin.Application, config *service.Config) {
c.config = config
desktop := app.Command("desktops", "Operate on registered desktops.")
desktop := app.Command("windows_desktops", "Operate on registered desktops.").Alias("desktops")
c.desktopList = desktop.Command("ls", "List all desktops registered with the cluster.")
c.desktopList.Flag("format", "Output format, 'text', 'json' or 'yaml'").Default(teleport.Text).StringVar(&c.format)
c.desktopList.Flag("verbose", "Verbose table output, shows full label output").Short('v').BoolVar(&c.verbose)