Skip to content

Commit

Permalink
lxc: Add dynamic --profile completions to lxc init|launch
Browse files Browse the repository at this point in the history
Signed-off-by: Kadin Sayani <[email protected]>
  • Loading branch information
kadinsayani committed Jan 7, 2025
1 parent 0ac1a3d commit 8c82d8c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lxc/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ lxc init ubuntu:24.04 v1 --vm -c limits.cpu=2 -c limits.memory=8GiB -d root,size
return c.global.cmpImages(toComplete)
}

_ = cmd.RegisterFlagCompletionFunc("profile", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return c.global.cmpProfiles(toComplete, true)
})

return cmd
}

Expand Down

0 comments on commit 8c82d8c

Please sign in to comment.