CLI autocompletion does not work in 3.0

Bug #1996608 reported by Maksim Beliaev
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

multipass launch -n testjuju -m 2g -c 1 -d 5G -v
multipass shell testjuju

then
```
sudo snap install juju --channel 3.0/stable
```

and try to type

```
juju s
```

and press tab, no autocompletion. Same with other commands

Details:
multipass version
multipass 1.10.1
multipassd 1.10.1

juju version
3.0.0-genericlinux-amd64

Revision history for this message
Ian Booth (wallyworld) wrote :

It's not multipass that's the issue - strictly confined snaps need a "completer" line in snapcraft.yaml and juju doesn't have it.

summary: - CLI autocompletion does not work in multipass in 3.0
+ CLI autocompletion does not work in 3.0
Changed in juju:
milestone: none → 3.0.3
status: New → Triaged
importance: Undecided → High
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

any update on the issue?

Revision history for this message
Vitaly Antonenko (anvial) wrote :

To fix this bug, we need a new completer binary to be written in Go to replace the Python code that exists today. When this report will be in focus, we will change its status.

Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

so, strictly confined snap does not support python autocompletions ?

Revision history for this message
John A Meinel (jameinel) wrote :

Strictly confined snaps don't support the type of autocompletion that we have been doing in the 2.9 versions
https://forum.snapcraft.io/t/tab-completion-for-snaps/2261

Specifically, if we wanted to use our existing auto completion code, we'd have to package in python, and various other dependencies that had been used to parse the juju help text to build the autocompletion snippets that bash needs. (and with python, you then need any .so, etc that exist in the chain)

Rather than bring all of that in, we want to create a small go process that can just build against the juju codebase, and use the internal structures (rather than parsing the help text), but that does take a fair bit of effort.

Changed in juju:
milestone: 3.0.3 → 3.1.0
Revision history for this message
John A Meinel (jameinel) wrote :

(as I did deeper, I do wonder if we could just add the 'completer: ' line, certainly the 'core' snap gives us a python that we could use, and not have to bundle our own)

Harry Pidcock (hpidcock)
Changed in juju:
milestone: 3.1.0 → 3.1.2
Changed in juju:
milestone: 3.1.2 → 3.1.3
Changed in juju:
milestone: 3.1.3 → 3.1.4
Changed in juju:
milestone: 3.1.4 → 3.1.5
Changed in juju:
milestone: 3.1.5 → 3.1.6
Changed in juju:
milestone: 3.1.6 → 3.1.7
Revision history for this message
Vitaly Antonenko (anvial) wrote :

I removed milestone, because (due to John's comment) it sounds more like rewriting our autocompletion code.

Potentially, we can retriage it as a `wishlist` and try to take it into the next roadmap.

Changed in juju:
milestone: 3.1.7 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.