bash completion for ubuntu-bug

Bug #218933 reported by Daniel Hahler
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Wishlist
Martin Pitt

Bug Description

Binary package hint: apport

Please add tab completion for ubuntu-bug.
For "-p", the general "apt-cache pkgnames" should get used.
For "-P", the list of available PIDs should get used.

Daniel Hahler (blueyed)
Changed in apport:
importance: Undecided → Wishlist
Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

for someone that like file file many bugs, it would be really useful to have apport auto complete the package names.

Revision history for this message
Martin Pitt (pitti) wrote :

I haven't worked with creating bash completions yet, but I'm happy to accept patches. :-)

Changed in apport:
status: New → Triaged
Revision history for this message
Rory McCann (rorymcc) wrote :

there is bash completion for package names for other programmes, (e.g.: aptitude), so in theory it shouldn't be much work to add it to ubuntu-bug

Revision history for this message
Philip Muškovac (yofel) wrote :

Heh, funny that I find that bug now... I actually wrote one for me over the holidays. It works fine for me, but since I wrote it from the 'ubuntu-bug --help' output someone should check if it works ok. I didn't have any issues so far. For bugs just ping me on IRC in #ubuntu-bugs
To use the attachment copy it somewhere and type 'source /path/to/apport_completion' in your bash prompt.

Revision history for this message
Philip Muškovac (yofel) wrote :

Found a bug after all...

Revision history for this message
Martin Pitt (pitti) wrote :

Sweet, thanks! We need to make this work for "apport-bug" as well (which is the upstream name), but that should be easy.

Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Philip Muškovac (yofel) wrote :

Sure, apport-bug support added.

Revision history for this message
Philip Muškovac (yofel) wrote :

I tried to add some apport-cli support, but even though the --help output is the same as apport-bug I get

$ apport-cli --pid 1
No pending crash reports. Try --help for more information.

$ apport-cli -p tcsh
No pending crash reports. Try --help for more information.

apport-cli itself or the documentation broken?

Revision history for this message
Philip Muškovac (yofel) wrote :

Updated again, and it makes more sense to get the file from

http://bazaar.launchpad.net/~yofel/%2Bjunk/misc/files/head%3A/apport/

before I add a new file all the time.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 218933] Re: bash completion for ubuntu-bug

Philip Muškovac [2010-01-13 11:11 -0000]:
> $ apport-cli --pid 1
> No pending crash reports. Try --help for more information.

Right, if you want to file a bug you need to specify -f.
apport-bug does that for you, and also selects an appropriate
frontend.

> apport-cli itself or the documentation broken?

I think the synopsis points it out well enough, and there's a
detailled description of all the options. But if it's unclear, I'm
happy to accept/do clarifications in the manpage.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Martin Pitt (pitti)
Changed in apport (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Committed your latest version (from your r10) into apport trunk (r1698).

Many thanks!

Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Philip Muškovac (yofel) wrote :

Ok, I finished the completion for now. It now has
support for all parameters for ubuntu-bug apport-bug and apport-cli with more restricted filename completion than r10
apport-unpack completion only completes on .crash/.apport files and foldernames
apport-collect has package completion if -p | --package is given
Mail be if you find any bugs or if I forgot anything.

Revision history for this message
Martin Pitt (pitti) wrote :

Hello Philip,

Philip Muškovac [2010-01-19 0:57 -0000]:
> Ok, I finished the completion for now.

Thank you! I pulled the latest version into apport trunk.

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

This bug was fixed in the package apport - 1.12-0ubuntu1

---------------
apport (1.12-0ubuntu1) lucid; urgency=low

  * New upstream release:
    - launchpad.py: Add options 'escalation_subscription' and 'escalation_tag'
      for handling bugs with more than 10 duplicates.
    - crashdb.conf: For Ubuntu, escalate bugs with >= 10 duplicates to
      "ubuntu-bugcontrol" and tag them with "bugpattern-needed".
      (LP: #487900)
    - general-hooks/generic.py: Filter out crashes on missing GLX
      (LP: #327673)
    - Add bash completion script. Thanks to Philip Muškovac. (LP: #218933)
    - launchpad.py: Drop APPORT_FILES whitelist for download() and instead
      just filter out file extensions that we know about (*.txt and *.gz).
      (LP: #444975)
    - launchpad.py: Do not put the Tags: field into the bug description, since
      they are already proper tags. In download(), convert the real tags back
      to the Tags: field. (LP: #505671)
    - test/crash: Update expected core dump flags for changed rlimit behaviour
      in Linux 2.6.32.
    - launchpad.py: Fix marking of 'checked for duplicate' for bugs with
      upstream tasks.
    - launchpad.py, get_fixed_version(): Do not consider a bug as invalid just
      because it has any invalid distro package task.
  * debian/local/setup-apport-retracer: Switch to lucid.
  * debian/local/setup-apport-retracer: Do not locally install python-apt and
    friends, users can run apt-get install in DC dchroots now.
  * debian/local/setup-apport-retracer: Don't add the retracer PPA for now,
    everything we need is in lucid.
 -- Martin Pitt <email address hidden> Wed, 20 Jan 2010 13:51:15 +0100

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
karaluh (karaluh) wrote :

I've got 1.12 installed, but the completion doesn't work.

Changed in apport (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Philip Muškovac (yofel) wrote :

now that you mention it, it indeed is included only in the apport source. Forgot to add '/etc/bash_completion.d' to apport.install pitti?

Revision history for this message
Martin Pitt (pitti) wrote :

*headdesk*, sorry for that. Packaging fix commited.

Changed in apport (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.12.1-0ubuntu1

---------------
apport (1.12.1-0ubuntu1) lucid; urgency=low

  [ Martin Pitt ]
  * New upstream bug fix release:
    - launchpad.py: Do not keep escalating bugs, just escalate at the 10th
      duplicate.
    - Improve error message if a symptom script did not determine a package
      name. (LP: #503834)
    - general-hooks/generic.py: Fix crash on libGL check with empty
      StacktraceTop.
    - Review and clean up usage of chmod(). This fixes a small race condition
      in the Python exception hook where a local attacker could read the
      information from another user's crash report. (LP: #516029)
    - hookutils, package_versions(): Ignore "None" packages, for more robust
      package hooks. (LP: #518295)
  * debian/apport.install: Actually install the bash completion file.
    (LP: #218933)
  * Bump Standards-Version to 3.8.4 (no changes necessary).

  [ Leann Ogasawara ]
  * source_linux.py: Tag kernel bugs which utilize a driver from staging. Also
    provide the list of staging drivers in use. Prefix suspend/resume bug
    titles with "[STAGING]" if a staging driver was being used.
    (LP: #524174, #524167)
 -- Martin Pitt <email address hidden> Mon, 22 Feb 2010 21:58:16 +0100

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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