snap info could autocomplete against installed snaps

Bug #1660970 reported by Mark Shuttleworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Medium
Unassigned

Bug Description

Without really thinking about it I found myself hitting tab to autocomplete 'snap info roc...' based on what I knew to be installed snaps. I can see a debate about autocompleting against both installed vs store snaps, but for now at least it would be very fast to autocomplete against installed snaps for commands like 'info'.

 - interfaces
 - run

Revision history for this message
John Lenton (chipaca) wrote :

snap info will complete against "any snap name", meaning it will complete directories (so you can find .snaps or directories that have a meta/snap.yaml), installed snaps, and remote snaps. This isn't a priority order, but the remote snaps will only complete if you give it at least three characters to search for (this is the only part that is weird I think, but knowing it also allows you to cheat). It seems to work well for me: having the 'http' snap installed, in a directory with a 'httputil' subdirectory, 'snap info ht<tab>' completes to http and a second tab will offer http, httpstat, and httputil/, as expected. Having rocketchat-server installed, "snap info ro<tab>" offers rocketchat-server, whereas "snap info roc<tab>" only completes as far as rocketchat- because of it now also doing a remote search and finding more stuff.

I'll look into making snap interfaces complete; I thought that was done already (it's probably going to be a two-liner diff to make it work, as the completion logic is already done for connect)

And snap run should be doable :-) I'll get on it in a bit. I think it's the only one completing on snap.app so it'll be more work.

John Lenton (chipaca)
Changed in snapd:
assignee: nobody → John Lenton (chipaca)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Currently snapd completes "snap info", "snap interfaces" but not "snap run".

John are you actively working on this issue? Shall we update the title to reflect just "snap run" and move it back to "confirmed" state?

Revision history for this message
John Lenton (chipaca) wrote :

for very-infrequent values of "active", yes.

Zygmunt Krynicki (zyga)
Changed in snapd:
assignee: John Lenton (chipaca) → nobody
status: In Progress → Confirmed
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.