Open GoogleCodeExporter opened 8 years ago
Thanks for your feedback. We are currently working on implementing this feature.
In the meantime, note that you can auto-complete the instance name, which will
also include the zone flag for you.
For example, assuming you had an uniquely named instance 'hello' in zone
'world'.
gcloud compute ssh hel[TAB]
Will auto-complete to:
gcloud compute ssh hello --zone world
If there is no unique completion, it will show you all the options.
Original comment by vil...@google.com
on 3 Dec 2015 at 6:34
Original comment by vil...@google.com
on 3 Dec 2015 at 6:34
Issue 413 has been merged into this issue.
Original comment by vil...@google.com
on 3 Dec 2015 at 6:36
Weirdly enough, when I try to tab-complete gcloud compute ssh development
--zone [tab], it doesn't tab complete out the zone, but it will perform
correctly while typing the vm name.
Should I file a separate bug for that?
Original comment by michael....@gmail.com
on 3 Dec 2015 at 6:40
Thank you for the additional feedback.
Did you try typing [tab] twice? That is:
gcloud compute ssh development --zone [tab][tab]
If you are not providing a sufficiently long prefix, you need to press tab
multiple times to obtain all the completion options. This is usual
auto-completion behavior.
Also note that an instance is identified by the (name, zone) pair. So
auto-complete completes them together. A zone however is auto-completed from
the list of all zones. This is similar to the prompt that asks you to pick a
zone.
Original comment by vil...@google.com
on 3 Dec 2015 at 8:16
If I tab twice, it lists all zones, rather than all zones which have an
instance named 'development', or simply completing the entire command for me.
It seems odd that tab completion will complete out the --zone command while
tabbing in the name of the instance, but not the zone when I've already fully
specified. At the same time, I don't fully understand the internals of how the
tab-completion is working, and what those constraints are.
Original comment by michael....@gmail.com
on 3 Dec 2015 at 9:18
Auto-complete completes a particular resource.
An instance is a special resource that requires its zone to be identified. So
while completing instances, the zone is completed as well.
A zone on the other hand does not need an instance to be identified, so its
completion is based on the list of all zones.
Original comment by vil...@google.com
on 3 Dec 2015 at 9:41
Has anyone resolved the tab-complete issue? Used to work for me and doesn't work anymore. Would love some insight into potential solutions.
Original issue reported on code.google.com by
michael....@gmail.com
on 3 Dec 2015 at 5:42