Skip to content

Commit

Permalink
lxc/console: Add completion
Browse files Browse the repository at this point in the history
Closes incus bug lxc/incus#1229.

Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 00aba5d5679f4703f87e19dbe4738db098cceb3a)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
  • Loading branch information
stgraber authored and kadinsayani committed Sep 26, 2024
1 parent 08b86af commit 7f08d58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lxc/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ as well as retrieve past log entries from it.`))
cmd.Flags().BoolVar(&c.flagShowLog, "show-log", false, i18n.G("Retrieve the container's console log"))
cmd.Flags().StringVarP(&c.flagType, "type", "t", "console", i18n.G("Type of connection to establish: 'console' for serial console, 'vga' for SPICE graphical output")+"``")

cmd.ValidArgsFunction = func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return c.global.cmpInstances(toComplete)
}

return cmd
}

Expand Down

0 comments on commit 7f08d58

Please sign in to comment.