juju switch command prints an error when tab is typed

Bug #1671270 reported by Matt Bruzek on 2017-03-08
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju
Wishlist
Unassigned

Bug Description

I had just destroyed a controller and had no model or controller set. When I tried to switch to another controller and used tab completion an ERROR was generated. Here is what I saw on the terminal:

$ juju switch conjure-upERROR no currently specified model
error: No selected controller.

Please use "juju switch" to select a controller.

-localhost-763:con

The controller I was trying to switch to is "conjure-up-localhost-763" that is just a lot to type out and tab completion is what I wanted to use. It looks like the tab completion worked but it got an error before it printed the rest of the controller name.

I have the snap of juju installed via conjure-up.

$ which juju
/snap/bin/juju

$ juju --version
2.1.2-yakkety-amd64

$ sudo snap list
Name Version Rev Developer Notes
charm 2.2 11 charms classic
conjure-up 2.1.2 117 canonical classic
core 16-2 1337 canonical -
lxd 2.10.1 1463 canonical -

Anastasia (anastasia-macmood) wrote :

I do not believe it is broken :) I don't think we have ever supported tab completion in 'juju switch'.

I am renaming the report and putting it on the Wishlist.

Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
summary: - juju switch tab completion is broken
+ support tab completion in juju switch

Categorize this issue as creatively as you wish. Juju prints an ERROR when you hit tab on the switch command. Some of those controller names are quite long and not convenient for users to type. Tab completion works on other commands and it is reasonable to expect Juju to not error when tab is used on the switch subcommand.

summary: - support tab completion in juju switch
+ juju switch command prints an error when tab is typed
Matt Bruzek (mbruzek) wrote :

Could we split this issue into two different bugs? One bug for the tab completion that can be on a wishlist. One bug for the ERROR printed to the end user when they are using the juju switch command?

Anastasia (anastasia-macmood) wrote :

@Matt Bruzek (mbruzek),

I am not sure how you would split this report into 2 bugs: you are getting an error because the command argument value is not complete/recognizable which is related to tab completion.

Do you have a reproducible scenario without using tab completion but still getting the same error? If yes, that would indeed be a separate bug: please file it separately with that scenario described.

tags: added: usability
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers