Debian Bug report logs -
#742466
bash-completion: unexpected EOF while looking for matching `) while completing in subshell
Reported by: Philipp Hagemeister <phihag@phihag.de>
Date: Mon, 24 Mar 2014 02:09:01 UTC
Severity: normal
Tags: patch
Found in versions bash-completion/1:2.1-4, bash-completion/1:2.8-2
Fixed in version bash-completion/1:2.8-3
Done: gabriel@inconstante.eti.br (Gabriel F. T. Gomes)
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, phihag@phihag.de, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#742466; Package bash-completion.
(Mon, 24 Mar 2014 02:09:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Philipp Hagemeister <phihag@phihag.de>:
New Bug report received and forwarded. Copy sent to phihag@phihag.de, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Mon, 24 Mar 2014 02:09:06 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: bash-completion
Version: 1:2.1-4
Severity: normal
Dear Maintainer,
to reproduce:
Type cat $(which b
Type [Tab].
With prior versions of bash-completions, this completed base64, basename, bash,
etc.
The current version outputs:
bash: unexpected EOF while looking for matching `)'
bash: syntax error: unexpected end of file
I believe the old behavior to be correct and the new one to be a bug.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (600, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bash-completion depends on:
ii bash 4.3-4
ii dpkg 1.17.6
bash-completion recommends no packages.
bash-completion suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#742466; Package bash-completion.
(Sun, 27 Apr 2014 17:06:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Julien Jorge <julien.jorge@stuff-o-matic.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Sun, 27 Apr 2014 17:06:04 GMT) (full text, mbox, link).
Message #10 received at 742466@bugs.debian.org (full text, mbox, reply):
Hi,
I encounter this bug too. The error occurs at line 560
of /usr/share/bash-completion/bash_completion.
For example, with bash launched with the -x option, the command below
produces the following output.
$ echo $(find [TAB]
Output:
+ _quote_readline_by_ref '$(find ' quoted
+ '[' -z '$(find ' ']'
+ [[ $(find == \'* ]]
+ [[ $(find == ~* ]]
+ printf -v quoted %q '$(find '
+ [[ \$\(find\ == *\\* ]]
+ printf -v quoted %s '$(find '
+ [[ $(find == \$* ]] # line 560
+ eval 'quoted=$(find '
bash: unexpected EOF while looking for matching `)'
bash: syntax error: unexpected end of file
Regards,
Julien
Information forwarded
to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#742466; Package bash-completion.
(Sun, 19 Feb 2017 19:15:03 GMT) (full text, mbox, link).
Acknowledgement sent
to No Reply <spambox@bsrealm.net>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Sun, 19 Feb 2017 19:15:03 GMT) (full text, mbox, link).
Message #15 received at 742466@bugs.debian.org (full text, mbox, reply):
Another way to trigger this bug is typing
for var in $(</etc/ho
and hitting Tab. This is a common scenario when working with files
containing stuff you need to process in some ways. I am hitting this
bug several times a day and this is very annoying. Wheezy was the last
distro where this bug didn't exist.
Information forwarded
to debian-bugs-dist@lists.debian.org, Gabriel F. T. Gomes <gabriel@inconstante.eti.br>:
Bug#742466; Package bash-completion.
(Sat, 10 Nov 2018 13:48:03 GMT) (full text, mbox, link).
Acknowledgement sent
to "G. Branden Robinson" <g.branden.robinson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gabriel F. T. Gomes <gabriel@inconstante.eti.br>.
(Sat, 10 Nov 2018 13:48:03 GMT) (full text, mbox, link).
Message #20 received at 742466@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: bash-completion
Version: 1:2.8-2
Followup-For: Bug #742466
I'm attaching a debdiff of a proposed NMU for this. I don't intend to
actually NMU unless this bug threatens not to make it into the next
Debian release (it's been around for several already :( ).
I hope this will make it easy to apply and get shipping.
This bug has been complained about for years; see, e.g.:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1312243
Note that tab-completion within POSIX command substitution is still not
fully-fledged; with this fix, one gets command-name substitution after
'$(', but filename completion after entering a command does not take
place. One has to force it manually, say with M-/.
Nevertheless this is still a huge improvement over the status quo by
preventing ugly stderr spew into the middle of the command one is
typing.
Tested with:
Debian's bash 4.4.18-3.1
upstream bash 5.0.0(1)-alpha
-- System Information:
Debian Release: buster/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.18.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-- no debconf information
[742466.diff (text/plain, attachment)]
Added tag(s) patch.
Request was from G. Branden Robinson <g.branden.robinson@gmail.com>
to control@bugs.debian.org.
(Sat, 10 Nov 2018 13:48:04 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Gabriel F. T. Gomes <gabriel@inconstante.eti.br>:
Bug#742466; Package bash-completion.
(Sat, 10 Nov 2018 17:15:03 GMT) (full text, mbox, link).
Acknowledgement sent
to "Gabriel F. T. Gomes" <gabriel@inconstante.net.br>:
Extra info received and forwarded to list. Copy sent to Gabriel F. T. Gomes <gabriel@inconstante.eti.br>.
(Sat, 10 Nov 2018 17:15:03 GMT) (full text, mbox, link).
Message #27 received at 742466@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi,
On 10 Nov 2018, G. Branden Robinson wrote:
>Package: bash-completion
>Version: 1:2.8-2
>Followup-For: Bug #742466
>
>I'm attaching a debdiff of a proposed NMU for this. I don't intend to
>actually NMU unless this bug threatens not to make it into the next
>Debian release (it's been around for several already :( ).
It wouldn't be a problem, at all, if you submitted this as a NMU.
Anyhow, thanks for bringing this up for discussion first.
>I hope this will make it easy to apply and get shipping.
It does, indeed. Thank you very much.
>This bug has been complained about for years; see, e.g.:
I'm sorry that this has been open for so long... I have been working
on many ancient bugs recently, and I hope to fix many of them before
the next Debian release. However, I started with those marked as
important (I didn't question the reasons why a few bugs were marked as
important, nor the correctness of the classification, because it
predates my adoption of bash-completion).
Thank you very much for raising awereness for this bug... If you know
of any other bugs that deserve immediate attention, please let me know
and I'll glady focus on them.
>Note that tab-completion within POSIX command substitution is still not
>fully-fledged; with this fix, one gets command-name substitution after
>'$(', but filename completion after entering a command does not take
>place. One has to force it manually, say with M-/.
I have tested this change and it does exactly what's described above,
with one addition: after the command name substitution, nor filename,
nor *subcommand* substitution take place. For instance:
$ echo $(cv[TAB][TAB]
cvlc cvs-debi cvs-switchroot
cvs cvs-debrelease cvt
cvs-debc cvs-debuild cvtsudoers
as expected, but:
$ echo $(cvs lo[TAB][TAB]
(no output)
when it should have completed `log' with `log '.
(This comment is just a clarification for other people reading this bug
report in the future)
>Nevertheless this is still a huge improvement over the status quo by
>preventing ugly stderr spew into the middle of the command one is
>typing.
I agree and I'm preparing a new upload with this and other changes.
May I attribute this change to you (as commit author) in the git
repository for Debian's bash-completion. It would like like the
attached patch.
[0001-Fix-completion-with-POSIX-command-substitution.patch (text/x-patch, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Gabriel F. T. Gomes <gabriel@inconstante.eti.br>:
Bug#742466; Package bash-completion.
(Sat, 10 Nov 2018 17:39:09 GMT) (full text, mbox, link).
Acknowledgement sent
to "G. Branden Robinson" <g.branden.robinson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gabriel F. T. Gomes <gabriel@inconstante.eti.br>.
(Sat, 10 Nov 2018 17:39:09 GMT) (full text, mbox, link).
Message #32 received at 742466@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
At 2018-11-10T15:07:23-0200, Gabriel F. T. Gomes wrote:
> Hi,
>
> On 10 Nov 2018, G. Branden Robinson wrote:
>
> >Package: bash-completion
> >Version: 1:2.8-2
> >Followup-For: Bug #742466
> >
> >I'm attaching a debdiff of a proposed NMU for this. I don't intend to
> >actually NMU unless this bug threatens not to make it into the next
> >Debian release (it's been around for several already :( ).
>
> It wouldn't be a problem, at all, if you submitted this as a NMU.
> Anyhow, thanks for bringing this up for discussion first.
My pleasure. I see you recently took over the package, so I'm not
really inclined to preëmpt you, as exasperating as I have found the bug.
:)
> >I hope this will make it easy to apply and get shipping.
>
> It does, indeed. Thank you very much.
You're most welcome!
> >This bug has been complained about for years; see, e.g.:
>
> I'm sorry that this has been open for so long... I have been working
> on many ancient bugs recently, and I hope to fix many of them before
> the next Debian release. However, I started with those marked as
> important (I didn't question the reasons why a few bugs were marked as
> important, nor the correctness of the classification, because it
> predates my adoption of bash-completion).
Having maintained the XFree86 bug list long ago I appreciate what a task
this is. Starting with the high-severity bugs is the right thing to do.
And some bugs will have been miscategorized or insufficiently triaged;
it is the nature of the beast.
> Thank you very much for raising awereness for this bug... If you know
> of any other bugs that deserve immediate attention, please let me know
> and I'll glady focus on them.
For the most part, bash and its completions work as I expect, or
completions simply silently fail the way I got used to back in the days
before bash had programmable completion at all.
This was the only completion bug I can ever recall that upset me. :-O
> >Note that tab-completion within POSIX command substitution is still not
> >fully-fledged; with this fix, one gets command-name substitution after
> >'$(', but filename completion after entering a command does not take
> >place. One has to force it manually, say with M-/.
>
> I have tested this change and it does exactly what's described above,
> with one addition: after the command name substitution, nor filename,
> nor *subcommand* substitution take place. For instance:
>
> $ echo $(cv[TAB][TAB]
> cvlc cvs-debi cvs-switchroot
> cvs cvs-debrelease cvt
> cvs-debc cvs-debuild cvtsudoers
>
> as expected, but:
>
> $ echo $(cvs lo[TAB][TAB]
> (no output)
>
> when it should have completed `log' with `log '.
Yes, that's true. There is definitely still a bug, or a missing feature
here.
The instant issue is simply to get bash to stop spewing noise to stderr
during completion attempts.
> I agree and I'm preparing a new upload with this and other changes.
>
> May I attribute this change to you (as commit author) in the git
> repository for Debian's bash-completion. It would like like the
> attached patch.
I'm fine with that, but credit for identifying that stanza as requiring
deletion should go to Malte Skoruppa; he made the observation in June of
2015.
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1312243/comments/8
Thank you for your efforts in getting bash-completion into good shape
for the buster release!
Regards,
Branden
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Gabriel F. T. Gomes <gabriel@inconstante.eti.br>:
Bug#742466; Package bash-completion.
(Sat, 10 Nov 2018 20:21:05 GMT) (full text, mbox, link).
Acknowledgement sent
to "Gabriel F. T. Gomes" <gabriel@inconstante.net.br>:
Extra info received and forwarded to list. Copy sent to Gabriel F. T. Gomes <gabriel@inconstante.eti.br>.
(Sat, 10 Nov 2018 20:21:05 GMT) (full text, mbox, link).
Message #37 received at 742466@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On 10 Nov 2018, G. Branden Robinson wrote:
>At 2018-11-10T15:07:23-0200, Gabriel F. T. Gomes wrote:
>> May I attribute this change to you (as commit author) in the git
>> repository for Debian's bash-completion. It would like like the
>> attached patch.
>
>I'm fine with that, but credit for identifying that stanza as requiring
>deletion should go to Malte Skoruppa; he made the observation in June
>of 2015.
>
>https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1312243/comments/8
The commit in Debian's bash-completion repository is now available at
https://salsa.debian.org/debian/bash-completion/commit/97c60ae8446c207b6a3a073d3649967e039c161b
I have just uploaded version 1:2.8-3 with that (and another bug) fixed,
so it should show up in sid soon.
Thank you.
[Message part 2 (application/pgp-signature, inline)]
Reply sent
to gabriel@inconstante.eti.br (Gabriel F. T. Gomes):
You have taken responsibility.
(Sat, 10 Nov 2018 20:45:12 GMT) (full text, mbox, link).
Notification sent
to Philipp Hagemeister <phihag@phihag.de>:
Bug acknowledged by developer.
(Sat, 10 Nov 2018 20:45:12 GMT) (full text, mbox, link).
Message #42 received at 742466-close@bugs.debian.org (full text, mbox, reply):
Source: bash-completion
Source-Version: 1:2.8-3
We believe that the bug you reported is fixed in the latest version of
bash-completion, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 742466@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Gabriel F. T. Gomes <gabriel@inconstante.eti.br> (supplier of updated bash-completion package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 10 Nov 2018 18:00:06 -0200
Source: bash-completion
Binary: bash-completion
Architecture: source all
Version: 1:2.8-3
Distribution: unstable
Urgency: medium
Maintainer: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
Changed-By: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
Description:
bash-completion - programmable completion for the bash shell
Closes: 742466 891667
Changes:
bash-completion (1:2.8-3) unstable; urgency=medium
.
[G. Branden Robinson <g.branden.robinson@gmail.com>]
* Fix extremely annoying and long-standing breakage of completion
within POSIX command substitution $(). (Closes: #742466)
.
[Gabriel F. T. Gomes <gabriel@inconstante.eti.br>]
* Revert `Extra fix for man completion' (from version 1:2.8-2).
* Fix wildcard completion. (Closes: #891667).
Checksums-Sha1:
2efc513a3190e887d1f761cd982d8b4e7d35750d 1969 bash-completion_2.8-3.dsc
35fee8671780535392d6d61558bd6c03af3c5587 19176 bash-completion_2.8-3.debian.tar.xz
2bc1526d52800bc16875a4e0a21610c3bbaf81f4 207524 bash-completion_2.8-3_all.deb
02ff74f8271d55a329d759dda5f91c989dee4ff7 5395 bash-completion_2.8-3_amd64.buildinfo
Checksums-Sha256:
82ffd566d5ee3abf6779703ed2223bd22ce836f71c67f774328d0bbbea60356e 1969 bash-completion_2.8-3.dsc
03f57d7561b2b92a4c3e3b6689d17ace855665469637c6a745f0f34683bd2520 19176 bash-completion_2.8-3.debian.tar.xz
6453a79810fc7ef1c42e74564b4020d9be99dc7e1f2c10669573d7a8b94f548c 207524 bash-completion_2.8-3_all.deb
ae9047f0b8e46381df70ed148368ee7dee704cf4690c1d3277ef4138897d2ecc 5395 bash-completion_2.8-3_amd64.buildinfo
Files:
9e591202c7ddda2358db47b14d8cb1a8 1969 shells standard bash-completion_2.8-3.dsc
6bfeb1797195d05b88a66581670b42f7 19176 shells standard bash-completion_2.8-3.debian.tar.xz
d103f52a989c483de27a834f127b4684 207524 shells standard bash-completion_2.8-3_all.deb
1df172505e753323fe8d020ab9d7d7d2 5395 shells standard bash-completion_2.8-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCgA5FiEE+wUJHFVUA1wadvc8rpsRODhuyvIFAlvnOhMbHGdhYnJpZWxA
aW5jb25zdGFudGUuZXRpLmJyAAoJEK6bETg4bsryJbcP/iBeqRuJnnU+eQMRvvrp
uhHMnGtBCfwQzhEV/ce0t42eiGSCxZmPLiztvko80UfmlB+iBOkv4QHTAdP8d9+m
KoGlTiMpeOgYbvIWotIRVhHveRtZBT0c/+tl/3aBOerVsS6i56pL67RbeUy2J5Ae
J04gUzcbINTGmfetl5xKc39yGDLFbtpos0jfCr7YdWI82pbCVQv65KnYZGo/swpO
vSEt8ifjPq2J9A4FV1kWY2PSiPEqZiwziBc+meZHcCKAN7SOw7PVO9Xs/gg72dqC
bIra/BS6fGWI7XelZN1G2PomqQnNVtF/zwGB4VAMU0yX9Ce24X/lWY7OqyY5x/GS
hfybOpMShcUsp+SD/Exrt9v8UvSVCuuaxKtE/9CwHzs9emm3DPAmJqqPSKPUGGjG
+Wk5lEQjFGjIoMW82eDeQ9XFjwOrYmk+EJ+OhRoBSjcdTvllLyvXG7FCw2kKIzCj
BCsy4hEZ0rsnvdm9eviUKaDcYVydy2LUViyW/tWuB6H7JI34xNINSuCR/2ST8CxG
GejloGoQXc3OepaR6+Su2IJAZ1zcxPHjCOx+WjAcy1MnNREFkQPcXEVmqR2V6Kqr
jicmVW0Ahqju0GkJ+4X3eqfsgm1stvVdxVOWoxhQdrbGcCJrGMztoVYPC/r2siWe
LNEWPa43r56XXmxqgyo/F0uB
=CebB
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 14 Dec 2018 07:32:05 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jul 2 09:19:51 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.