From f75c8d3f59caf4dbf669180678056a2c19c4d599 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Mon, 8 Jan 2024 19:54:24 -0500 Subject: [PATCH] cmd: add autocomplete to `zed use` This shortcut was missing the autocompletion available in the longform `zed context use`. --- internal/cmd/cmd.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index ba65f5a9..a128be5e 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -64,10 +64,11 @@ func Run() { // Register root-level aliases rootCmd.AddCommand(&cobra.Command{ - Use: "use ", - Short: "an alias for `zed context use`", - Args: cobra.MaximumNArgs(1), - RunE: contextUseCmdFunc, + Use: "use ", + Short: "an alias for `zed context use`", + Args: cobra.MaximumNArgs(1), + RunE: contextUseCmdFunc, + ValidArgsFunction: ContextGet, }) // Register CLI-only commands.