Closed jwhitbeck closed 1 week ago
Thank you for the bug and especially thank you for the minimal reproduction case! That really made things much easier!
The good news is that I can reproduce the issue. The bad news is that I have no idea what's going on at this point. This is very puzzling.
This is an issue with bash 5.2.15 but not with bash 5.2.37 (which I have installed on my laptop.) My best guess at this point is that bash-completion.el
does something that confuses some versions of bash when running functions that use this particular idiom. I'm trying to understand what that is.
For now, as a workaround, you can do one of the following:
M-x customize-option explicit-shell-file-name
to the more recent version rather than /usr/bin/bash
M-x customize-option bash-completion-use-separate-process
and set it to t. This is much less powerful (see the description) but doesn't suffer from this issue, even with bash 5.2.15.Actually, after more tests, it seems now that there are intermittent failures, no matter the version of bash, so switching to a more recent version of bash might not work.
This should work now, with the latest git version. A new version with a fix should be on available on melpa tomorrow. Please let me know if you're still having issues.
I just upgraded this morning and the new release works like a charm. Thanks for the fix and the fast turnaround!
Thanks for bash-completion.el. I've been using
M-x shell
for years, and bash-completion.el has been a key part of that workflow.Recently, I noticed what appears to be a small bug with completion scripts that use Bash process substitution. I originally noticed it when using LXC, whose bash completion script invokes the following idiom
For LXC, bash completion (e.g.,
lxc-info <tab>
) works as expected from Gnome Terminal, but doesn't work in Emacs's shell.el.Here is a minimal reproduction case.
In Gnome Terminal,
mycmd <tab>
proposesfoo
andbar
completions as expected, but bash-completion.el returns withNo completion found
.Here is the output of
M-x bash-completion-debug
. I'm usingbash-completion.el
frommaster
(0f4f7ab45648d5fed0f8a67526c1a6902754f84c).Note that both work as expected if I change the completion script above as follows.