completion with ubuntu-bug complains about missing release-upgrade.py

Bug #1221503 reported by Daniel Barrett
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
New
Undecided
Unassigned

Bug Description

To reproduce the problem, type this command at a shell prompt (DO NOT PRESS ENTER AFTERWARD):

$ ubuntu-bug

and with the cursor at the end of the line, press the TAB key. The following errors appear:

egrep: /usr/share/apport/symptoms/dist-upgrade.py@: No such file or directory
egrep: /usr/share/apport/symptoms/release-upgrade.py@: No such file or directory

If you clear the completion rules with "complete -r", this problem goes away.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: bash-completion 1:2.0-1ubuntu3
ProcVersionSignature: Ubuntu 3.8.0-29.42-generic 3.8.13.5
Uname: Linux 3.8.0-29-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
Date: Thu Sep 5 22:04:37 2013
InstallationDate: Installed on 2013-08-31 (5 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: bash-completion
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Daniel Barrett (dbarrett-m) wrote :
Revision history for this message
Daniel Barrett (dbarrett-m) wrote :

Confirming that this is still broken in Saucy Salamander.

Revision history for this message
Peter Cordes (peter-cordes) wrote :

You have alias ls='ls -F', and /etc/bash_completion.d/apport_completion fails to use command ls to avoid getting your alias.

/etc/bash_completion.d/apport_completion is supplied by apport, so it's a bug in that package.

working on a patch now.

affects: bash-completion (Ubuntu) → apport (Ubuntu)
Revision history for this message
Peter Cordes (peter-cordes) wrote :

attaching a patch. I think I tested everything I changed. I replaced the loop over ls output with grep -l | sed.

I made a bunch of overall changes and improvements to the script, too.

When completing an empty word, instead of returning the full list of all available packages, all PIDs, and all files in the current directory, list just symptoms and made-up stand-in describing what arguments it accepts

Completion doesn't list short options, just the long-option version. If you don't know what option you want, a letter doesn't tell you anything.

$ apport-bug [TAB]
audio dist-upgrade storage
#buggy-file# --help --tag
#buggy-package# release-upgrade ubuntu-release-upgrader
#buggy-process-id# --save --version
display security --window

 File and directory completion via _filedir, compopt -o dirnames fallback, or complete -f -d, never via complete -G "$cur*" or anything similarly horrible that will break with spaces in filenames.

 Also tidied up the functions. I think the point of some code duplication was to special-case completing the bare command, and only list --help and --version if we were completing the first argument. (which was kind of moot when completion output also included something like 40k package names...) Could still do that by checking $cword.

Changed in apport (Ubuntu):
status: New → In Progress
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "several fixes: don't break with aliased ls, major speed improvements, keep results small when completing an empty word, and handle spaces" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
John Drinkwater (johndrinkwater) wrote :

Bug still exists on 15.10

Revision history for this message
Benjamin Drung (bdrung) wrote :

Setting back to New. The patch is not applied yet, but I failed to reproduce the error on tab completion.

Changed in apport (Ubuntu):
status: In Progress → New
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.