-
Notifications
You must be signed in to change notification settings - Fork 933
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 remote switch
should suggest completion of any locally configured remote
#14635
Comments
TIL that |
I'm seeing all of my remotes (including non-default remotes) appear when tab completing |
@kadinsayani if you've built snaps before, you should have |
It looks like this issue is only prevalent with the LXD snap - upon regenerating the completion script and sourcing it locally, all remotes appear as expected. A fresh install of the LXD snap yields the following results: root@c1:~# lxd.lxc __complete remote switch cd
ubuntu
ubuntu-daily
ubuntu-minimal
ubuntu-minimal-daily
images
cdimage
local
:4
Completion ended with directive: ShellCompDirectiveNoFileComp
root@c1:~# lxd.lxc remote switch [TAB]
images ubuntu ubuntu-minimal
local ubuntu-daily ubuntu-minimal-daily The completion directive returns all of the available remotes, but it appears that |
…pletions (#14677) Resolves 1/2 issues raised in #14635. This PR adds logic to exclude the default (current) remote from shell completions when running `lxc remote switch|remove`. As described in [this comment](#14635 (comment)), it appears that `snapd` is intercepting the response and excluding non-default remotes (`cdimage` in this case). I'll see if I can land a fix for the second issue in https://github.com/canonical/lxd-pkg-snap.
It seems that only builtin remote are proposed during tab-completion:
But I have many more remotes. Icing on the cake would be to remove the
current
one from the list of suggestion.Additional information
The text was updated successfully, but these errors were encountered: