Bash-completion does not respect end of options argument (--)

Bug #840467 reported by Peter Wu
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
valgrind (Ubuntu)
Fix Released
Low
Unassigned
Trusty
Fix Released
Low
Unassigned
Vivid
Fix Released
Low
Unassigned

Bug Description

Valgrind does not attempt to parse argument after seeing "--". The bash completion script does not take that into account when completing commands after valgrind and `valgrind -- ls -<TAB><TAB>` still tries to complete valgrinds options.

Revision history for this message
Peter Wu (lekensteyn) wrote :
Revision history for this message
Alessandro Ghedini (ghedo) wrote :

> `valgrind -- ls -<TAB><TAB>` still tries to complete valgrinds options.

I cannot reproduce this, do you still have problems with an up-to-date version of the package?

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Make arguments after -- complete as commands" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Peter Wu (lekensteyn) wrote :

Yes, the problem still exists on Precise. Other issues I encounted:

`valgrind -- foo<TAB>` becomes `valgrind -- ` (empty). `valgrind -- <TAB><TAB>` shows `yes` or `no` as options. I expect a list of commands.

This applies recursively:
`valgrind -- ls -- foo<TAB>` becomes `valgrind -- ls -- ` (empty).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package valgrind - 1:3.10.1-1ubuntu3

---------------
valgrind (1:3.10.1-1ubuntu3) wily; urgency=medium

  * Build with GCC fixing PR target/65456. LP: #1434222.
  * Fix DCACHEBSIZE and HWCAP2 issues. LP: #1428002.
  * Fix bash command completion to respect end of options argument (--).
    LP: #840467.

 -- Matthias Klose <email address hidden> Wed, 15 Jul 2015 09:48:13 +0200

Changed in valgrind (Ubuntu):
status: New → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Peter, or anyone else affected,

Accepted valgrind into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/valgrind/1:3.10.1-1ubuntu3~14.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in valgrind (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Mathew Hodson (mhodson)
Changed in valgrind (Ubuntu):
importance: Undecided → Low
Changed in valgrind (Ubuntu Trusty):
importance: Undecided → Low
Changed in valgrind (Ubuntu Vivid):
importance: Undecided → Low
Revision history for this message
Mathew Hodson (mhodson) wrote :

I tested the commands in the description and comment #4. I get the options for ls not valgrind, and I don't get the behaviour described in comment #4.

$ valgrind -- ls -<TAB><TAB>
--all
--almost-all
--author
--block-size=
--classify
--color
--color=
--context
--dereference
--dereference-command-line
--dereference-command-line-symlink-to-dir
--directory
--dired
--escape
--file-type
--format=
--group-directories-first
--help
--hide=
--hide-control-chars
--human-readable
--ignore=
--ignore-backups
--More--

$ valgrind -- nan<TAB>
$ valgrind -- nano

$ apt list valgrind
Listing... Done
valgrind/trusty-proposed,now 1:3.10.1-1ubuntu3~14.04 amd64 [installed]

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package valgrind - 1:3.10.1-1ubuntu3~14.04

---------------
valgrind (1:3.10.1-1ubuntu3~14.04) trusty-proposed; urgency=medium

  * SRU. Backport the 1.10 series to 14.04 for ppc64el support. LP: #1386524.
  * Also fixes segfault on ppc64el, LP: #1377796.

valgrind (1:3.10.1-1ubuntu3) wily; urgency=medium

  * Build with GCC fixing PR target/65456. LP: #1434222.
  * Fix DCACHEBSIZE and HWCAP2 issues. LP: #1428002.
  * Fix bash command completion to respect end of options argument (--).
    LP: #840467.

valgrind (1:3.10.1-1ubuntu2) vivid; urgency=medium

  * Build for glibc-2.21. LP: #1435261.

valgrind (1:3.10.1-1ubuntu1) vivid; urgency=medium

  * Merge with Debian; remaining changes:
    - Remove valgrind-mpi package from Ubuntu and any references to it, as
      mpi-default-dev is in universe for the time being.
    - Lower over-inflated valgrind-dbg Recommends to Suggests instead.
    - Don't strip vgpreload* on ARM; this results in unusable stack traces
      without valgrind-dbg.
    - Configure with --enable-only64bit on AArch64.

 -- Matthias Klose <email address hidden> Wed, 15 Jul 2015 09:37:42 +0200

Changed in valgrind (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for valgrind has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Mathew Hodson (mhodson) wrote :

Fixed in valgrind 1:3.10.1-1ubuntu3~15.04 source package.

---
valgrind (1:3.10.1-1ubuntu3~15.04) vivid-proposed; urgency=medium

  * SRU. Backport the 1.10 series to 14.04 for ppc64el support. LP: #1386524.
  * Also fixes segfault on ppc64el, LP: #1377796.

 -- Matthias Klose <email address hidden> Sat, 26 Sep 2015 08:57:45 +0200

valgrind (1:3.10.1-1ubuntu3) wily; urgency=medium

  * Build with GCC fixing PR target/65456. LP: #1434222.
  * Fix DCACHEBSIZE and HWCAP2 issues. LP: #1428002.
  * Fix bash command completion to respect end of options argument (--).
    LP: #840467.

 -- Matthias Klose <email address hidden> Wed, 15 Jul 2015 09:48:13 +0200

Changed in valgrind (Ubuntu Vivid):
status: New → Won't Fix
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.