Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxc: Improved cli completions (from Incus) #13959

Merged
merged 28 commits into from
Sep 5, 2024

Conversation

@kadinsayani kadinsayani changed the title Improved cli completions (from Incus) lxc: improved cli completions (from Incus) Aug 21, 2024
lxc/completion.go Outdated Show resolved Hide resolved
lxc/main_aliases.go Outdated Show resolved Hide resolved
@kadinsayani kadinsayani force-pushed the improved-cli-completions branch 13 times, most recently from 35a723e to 76e6efe Compare August 28, 2024 21:41
@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Aug 28, 2024
@github-actions github-actions bot removed Documentation Documentation needs updating API Changes to the REST API labels Aug 28, 2024
@kadinsayani kadinsayani force-pushed the improved-cli-completions branch 4 times, most recently from 2a669dc to 5dadac3 Compare August 29, 2024 00:59
@kadinsayani kadinsayani marked this pull request as ready for review August 29, 2024 01:31
adamcstephens and others added 17 commits September 4, 2024 10:20
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit 9c771d896a3fd2ed81627e64c6d9d1577a63213c)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Fixes lxc/incus#588

Signed-off-by: montag451 <montag451@laposte.net>
(cherry picked from commit c9dc811c50dddab5c8bbb5d05d109e837383acfc)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit dbc3abaf2cb81e86c5812609651a34d59a55f1fa)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit b1d7bc15a4b51ab513ae3a6cf6dde0e2294c98e3)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit bd4e1c955b15e7d172d838082623e55e338cca76)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit caeb050b4eddcb0c714e69ae64d591771da985b5)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit 12696a775716a6b28f39a1498d4fa4ba8bd3d4c5)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit fb959bb4aaa03533c465b118baaff1ce69435e82)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit 714d3cdf5b1a9511b0a8305c070f5aea0d99dadc)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit 459e9e315373517e0b26fd0ee7bbb91306aabe59)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit 7b359e934edc6f3b170176f44f71e54ba2f638f7)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit 8ce2a3c7c09e7ae67e180c1fbe6a879bc21a5f9a)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Adam Stephens <adam@valkor.net>
(cherry picked from commit 06949bf3468105e8500fabfc839662a9d29059dd)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
(cherry picked from commit 6786970433f10fcd8687d8a3e50315444ef95965)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
Closes lxc/incus#377

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
(cherry picked from commit 3f9dd3bfe21d5a31eb810d21f47aafdde4ed61f0)
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
License: Apache-2.0
Signed-off-by: Kadin Sayani <kadin.sayani@canonical.com>
@tomponline tomponline merged commit 71381e6 into canonical:main Sep 5, 2024
29 checks passed
@tomponline
Copy link
Member

@kadinsayani @simondeziel how do I use this change locally (outside of the snap)?

@kadinsayani
Copy link
Contributor Author

@kadinsayani @simondeziel how do I use this change locally (outside of the snap)?

To test locally, you can run:

lxc completion bash > /tmp/completion
source /tmp/completion

tomponline added a commit to canonical/lxd-pkg-snap that referenced this pull request Sep 5, 2024
Cobra completions introduced in
canonical/lxd#13959, making bash completions
obsolete.
@tomponline
Copy link
Member

@kadinsayani @simondeziel how do I use this change locally (outside of the snap)?

To test locally, you can run:

lxc completion bash > /tmp/completion source /tmp/completion

Thanks, please can you add this to the docs https://documentation.ubuntu.com/lxd/en/latest/installing/#install-lxd-from-source

@simondeziel
Copy link
Member

@kadinsayani @simondeziel how do I use this change locally (outside of the snap)?

To test locally, you can run:

lxc completion bash > /tmp/completion source /tmp/completion

In the doc, I'd recommend putting it under the standard location: /etc/bash_completion.d/. This way it gets autoloaded/sourced.

@kadinsayani
Copy link
Contributor Author

kadinsayani commented Sep 5, 2024

In the doc, would it be worth including that completion profiles can also be generated for zsh and fish even though we don't do this in the snap package?

@simondeziel
Copy link
Member

In the doc, would it be worth including that completion profiles can also be generated for zsh and fish even though we don't do this in the snap package?

Yes please. In that case, I'd use the more portable . instead of source even in the bash example so that users only have to change one thing if they don't use bash.

tomponline added a commit that referenced this pull request Sep 6, 2024
@kadinsayani kadinsayani deleted the improved-cli-completions branch September 12, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants