Skip to content

CLI: Add lxc file completions and fix lxc profile copy completions (from Incus) #14749

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

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

kadinsayani
Copy link
Contributor

@kadinsayani kadinsayani commented Jan 6, 2025

This PR improves completions for lxc file and fixes an issue with lxc profile copy completions.

Summary of changes:

  • Improves remote and instance completions by only completing names based on the toComplete parameter.
  • Adds cmpFiles for improved lxc file push|pull completions.
  • Fixes an issue with lxc profile copy completions by making use of the cmpProfiles function.

Cherry-picks from lxc/incus#1445, lxc/incus#1453 and lxc/incus#1454.

@kadinsayani kadinsayani force-pushed the file-push-pull-completions branch 2 times, most recently from 1f82f6a to 9f26397 Compare January 6, 2025 19:03
Copy link
Member

@MusicDin MusicDin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor comments/questions.

@kadinsayani kadinsayani force-pushed the file-push-pull-completions branch from 9f26397 to d52403e Compare January 7, 2025 17:13
The completion functions for instance and remote names now only return
names prefixed by the string to be completed. This allows the caller
of these functions to improve their decisions about their own
completion behaviour.

Signed-off-by: montag451 <[email protected]>
(cherry picked from commit 42abaca45508aeab25f99da170e87101b2a327ab)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
This commit improves completions for `lxc file push|pull`

Signed-off-by: montag451 <[email protected]>
(cherry picked from commit d09af5317ae61c8557ed95caae144bcb88d74acb)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: montag451 <[email protected]>
(cherry picked from commit 237fdcec2fba6cb34f5519c16cdc4e48d6226d8f)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: montag451 <[email protected]>
(cherry picked from commit 09b3ebde479eeee6595a10c1f6e091940e231b1c)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: montag451 <[email protected]>
(cherry picked from commit f541396da8b76583fa11c82d6eb3eb25f37a81e5)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: montag451 <[email protected]>
(cherry picked from commit 65178013f600f194d02a5d7e5d20ce0d518825fd)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: montag451 <[email protected]>
(cherry picked from commit 28da5dabf6ebe9de1ad1e2f3412012b0ae5e9a2d)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
@kadinsayani kadinsayani force-pushed the file-push-pull-completions branch from d52403e to 7f3886c Compare January 7, 2025 19:48
@tomponline tomponline merged commit a06777b into canonical:main Jan 9, 2025
28 checks passed
@kadinsayani kadinsayani deleted the file-push-pull-completions branch January 9, 2025 14:12
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.

5 participants