← Back to issue list

Code completion for *.snap on the cli is broken

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1646213
Type
issue
State
closed
Author
~sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged canonical/snapcraft#933 (commit 5c41e4bc), which corrected Bash completion for .snap files containing multiple dots.

Resolution: closed resolved

Reason: Merged PR canonical/snapcraft#933 changed _filedir from a glob to the snap extension, restoring completion for all .snap filenames. The maintainer linked the resolving PR from the issue.

Evaluated by: mr-cal-bot

No scores available.

Issue body

_filedir "*.snap" means only files that match *.*.snap get tab-completed.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged canonical/snapcraft#933 (commit 5c41e4bc), which corrected Bash completion for .snap files containing multiple dots.
stealth/space-bunny-alpha — closed resolved Fixed snap-file tab completion in merged PR #933 (commit 5c41e4bc5) by passing the snap extension to _filedir instead of the *.snap glob.
stealth/space-bunny-alpha — closed stale CLI tab completion for .snap files was closed without a documented fix; matching Launchpad bug #1646213 was also closed without discussion, suggesting a stale closure.
qwen/qwen3.6-35b-a3b — — Closed without discussion. The tab completion logic was likely abandoned or fixed by adjusting the glob pattern to match snap files correctly.
qwen/qwen3.6-35b-a3b — — The .snap CLI completion bug was closed without comments or a documented fix, indicating it was likely abandoned. The report noted that _filedir "*.snap" incorrectly restricted tab completion to files matching *.*.snap.
qwen/qwen3.6-35b-a3b — — Closed without discussion. The tab completion bug for *.snap files, caused by an incorrect _filedir pattern, appears abandoned or resolved without documentation.
qwen3.6-35b-a3b-mtp-q6 — — Abandoned and closed without resolution. The report noted that _filedir *.snap incorrectly limits tab completion to files matching *.snap.snap. No fix or pull request was implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#933 (confidence 100%)

    Merged commit 5c41e4bc replaced _filedir "*.snap" with _filedir snap.

Related issues

Issue Project State Summary Similarity
#1390 meta: bash completion support snapcraft merged Merged PR #1390 added bash completion support for snapcraft and snapcraft metadata, landing as commit 2d01bc112.
76%
#453 Add in bash completion snapcraft merged Merged PR #453 via commit 6ea95fd50, adding a simple Bash completion script for Snapcraft commands.
76%
#1590767 Support snap installed completion scripts snapcraft (launchpad) closed Resolved by snapd 2.28 automatic completion integration and snapcraft completer wiring in merged PR #1956 (commit 32fbaf3d4).
75%
#4559 bash-completion: update and improve supported completion cases snapcraft closed Completion work in canonical/snapcraft#4559 was closed as stale and superseded by canonical/craft-cli#319, merged in commit 4d41d7d with generated Bash completion.
75%
#1570506 Snapcraft should use bash-completion snapcraft (launchpad) closed Added bash-completion support to snapcraft via merged upstream PR #453 (commit 6ea95fd50, changelog 16e1a9d76). Shipped in snapcraft 2.9 SRU to xenial; verified by elopio and released to -updates on 2016-05-30.
74%
#1751391 snapcraft's snap's snap.yaml doesn't plug in the completer snapcraft (launchpad) closed Snap completion was fixed by PR #1956 (commit 32fbaf3d4), adding completer: completion.sh to Snapcraft's snap app definition.
73%
#1956 snap: actually plug the completer in. snapcraft merged PR #1956 merged as commit 32fbaf3d4, wiring the bundled completion.sh into snap metadata so Snapcraft exposes tab completion.
72%
#872 Add some further bash-completion snapcraft merged Merged PR #872 via commit 5876e15ba, adding Bash completion for help plugins, snap/tour directories, and .snap files for several commands.
72%
#5218 feat: add improved bash completion script snapcraft merged Merged in #5218 (commit 387202653), replacing the manually maintained Bash completion with a dynamically generated script that tracks current commands and options; shipped in Snapcraft 8.7.
72%
#5022 Bash completion script is outdated snapcraft closed Snapcraft 8.7 replaced the stale manual Bash completion with an automatically generated script tracking current commands and options in merged PR #5218 (387202653).
71%