← Back to issue list

bash-completion: update and improve supported completion cases

View original Github issue

Metadata

Project
snapcraft
Number
#4559
Type
pull request
State
closed
Author
kubiko
Labels
Created
Updated
Closed

Current evaluation

Closed as stale. The bash-completion script will be superseded by @bepri's solution in canonical/craft-cli#319.

Suggested action:

No scores available.

Issue body

multiple improvements to the completion logic - add multiple new commands, - replace `snap` with `pack` - add supported architectures for `--target-arch` and `--build-for` - do not parse `snapcraft.yaml` as the format changes between core20 and core22 bases, and we have only a list of predefined options regardless, use those. - build | clean | pull | stage | prime: parse `snapcraft.yaml` for suggested parts - use `shell`/`sed` based custom parser. we do not want to bring yq as an extra dependency, and calling back to the python parser demonstrated to be very slow

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed as stale. The bash-completion script will be superseded by @bepri's solution in canonical/craft-cli#319.
qwen3.6-35b-a3b-mtp-q6 Updated bash-completion with new commands, architecture flags, and a faster sed-based parser for snapcraft.yaml. Tests passed. PR closed as stale and superseded by a completion implementation in craft-cli PR #319.
qwen3.6-35b-a3b-mtp-q6 Closed as stale and superseded by canonical/craft-cli#319. The PR improved bash completion by replacing snap with pack, adding architecture flags, and using sed for faster snapcraft.yaml parsing.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5022 Bash completion script is outdated snapcraft closed Resolved in snapcraft 8.7. The outdated bash completion script was replaced with a drastically improved, automatically generated version. The long-term fix was implemented via the craft-cli integration.
72%
#2111 feat: add improved bash completion script charmcraft merged Merged an improved bash completion script replacing the legacy version. Approved by two reviewers, the update adds 34 lines and removes 195 across six files. Resolves CRAFT-3874.
71%