← Back to issue list

completion /usr/lib/snapd/etelpmoc.sh error

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1863961
Type
issue
State
open
Author
~casper-dcl
Labels
—
Created
Updated
Closed
—

Current evaluation

gh snap tab completion broken: etelpmoc.sh cannot source /usr/share/bash-completion/bash_completion inside the snap, so _get_comp_words_by_ref is missing. Clear reproducer, but untriaged since 2020; cause looks like the snap missing bash-completion.

Suggested action: needs triage

Reason: The issue has zero labels, zero comments and no maintainer response after ~6.6 years, so it has never been categorised and needs a human decision. Investigation shows the failure originates outside snapcraft: the reporter's own `snap run --shell gh` output shows /usr/share/bash-completion/bash_completion does not exist inside the gh snap (the file etelpmoc.sh line 71 sources), so the fix is likely a missing `bash-completion` stage-package in the reporter's own snap packaging (casperdcl/cli snap branch), or a snapd robustness change tracked in snapcore/snapd. Snapcraft's completer wiring itself already works (commit 32fbaf3d4, PR #1956), so ownership/validity must be confirmed before closing.

Evaluated by: mr-cal-bot

Impact: 28 Quick Win: 13 Complexity: 25 Confidence: 60 Actionability: 62

Issue body

$ snap version snap 2.43.2 snapd 2.43.2 series 16 ubuntu 16.04 kernel 4.15.0-58-generic $ snap run --command=complete gh 9 9 3 1 " " 'gh ' gh "" /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8) /usr/lib/snapd/etelpmoc.sh: line 71: /usr/share/bash-completion/bash_completion: No such file or directory /snap/gh/x4/completion.sh: line 16: _get_comp_words_by_ref: command not found default According to https://forum.snapcraft.io/t/debugging-tab-completion/4198 this is a bug: > If you see a different error from etelpmoc.sh, most like we broke something! So sorry. Please let us know; we’ll sort it. > Most often though you’ll see an error from your script. You should be able to debug as usual, here. Completion doesn't work at all. However manually running $ . /snap/gh/current/completion.sh works so there's nothing wrong with the completion script itself. $ snap run --shell gh $ cd $SNAP /snap/gh/x5$ /snap/gh/x5$ source /usr/share/bash-completion/bash_completion bash: /usr/share/bash-completion/bash_completion: No such file or directory Source repo with snapcraft.yml: https://github.com/casperdcl/cli/tree/snap

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 28
Quick Win: 13
Complexity: 25
Confidence: 60
Actionability: 62
needs triage gh snap tab completion broken: etelpmoc.sh cannot source /usr/share/bash-completion/bash_completion inside the snap, so _get_comp_words_by_ref is missing. Clear reproducer, but untriaged since 2020; cause looks like the snap missing bash-completion.
stealth/space-bunny-alpha
Impact: 40
Quick Win: 16
Complexity: 50
Confidence: 84
Actionability: 80
needs triage Tab completion for the gh snap fails because etelpmoc.sh cannot load bash-completion, although the snap's completion script works when sourced manually; the report remains untriaged.
qwen/qwen3.8-27b
Impact: 15
Quick Win: 9
Staleness: 95
Complexity: 40
Confidence: 75
Support Request: 15
close stale Snapd's etelpmoc.sh completion wrapper fails inside a snap: /usr/share/bash-completion/bash_completion is missing, so tab completion breaks for the gh CLI on Ubuntu 16.04/snapd 2.43.2. Open ~6.5 years, no maintainer activity; bug is in snapd, not snapcraft.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 80
Support Request: 70
needs triage Reports snapd etelpmoc.sh completion error on Ubuntu 16.04 due to missing bash-completion file. Unlabeled, zero maintainer comments, inactive for over six years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 90
Support Request: 10
close stale snapd completion script fails with missing bash_completion path on Ubuntu 16.04. Reported over 6 years ago with zero maintainer interaction. Environment is EOL and outdated.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 75
close stale Reports bash-completion errors in snapd's etelpmoc.sh helper script. The issue is over 6 years old, lacks maintainer interaction, and targets an EOL Ubuntu version with a missing system package.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1590767 (confidence 70%)

    LP#1590767 'Support snap installed completion scripts' is the parent completer feature; it was closed as resolved when snapd 2.28 and snapcraft PR #1956 (commit 32fbaf3d4, 'snap: actually plug the completer in') shipped, showing the completer path itself is functional.

  • Related To: canonical/snapcraft#1956 (confidence 65%)

    Commit 32fbaf3d4 wired `completer:` through snapcraft, which is the mechanism this report exercises via `snap run --command=complete`.

Related issues

No related issues found above the similarity threshold.