Bash autocompletion not working for apt command

Bug #1358154 reported by Bogdan Arabadzhi on 2014-08-18
66
This bug affects 16 people
Affects Status Importance Assigned to Milestone
apt (Debian)
Fix Released
Unknown
bash-completion (Ubuntu)
Low
Brian Murray
Trusty
Low
Brian Murray

Bug Description

[Impact]

Bash completion is not working for the apt tool.

With the apt-get utility, you could do apt-g<tab> upg<tab> and hit enter and be done. With the new apt tool, you can no longer do this and instead have to type in apt list/update/upgrade/full-upgrade.

[Test Case]

* Type "apt upd".

* Press Tab key.

* Command should complete to "apt update".

* Repeat with the first three letters of other frequently used commands such as install/remove/purge/upgrade/full-upgrade/edit-sources.

* For the install command, the package name should be completed based on packages available in the repositories.

* For the remove/purge command, the package name should be completed based on packages installed on the system.

[Regression Potential]

There shouldn't be any regression since bash-completion didn't previously support apt at all.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash-completion (Ubuntu):
status: New → Confirmed
Changed in bash-completion (Debian):
status: Unknown → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash-completion - 1:2.1-4ubuntu1

---------------
bash-completion (1:2.1-4ubuntu1) vivid; urgency=medium

  * debian/patches/14-add-apt-bts747094.patch:
    - add support for the new "apt" command (LP: #1358154)
 -- Michael Vogt <email address hidden> Thu, 06 Nov 2014 09:18:02 +0100

Changed in bash-completion (Ubuntu):
status: Confirmed → Fix Released
DeadMetaler (dead-666) wrote :

After update bash-completion package still not working

$apt upd <TAB> -- nothing happen

tags: removed: autocompletion bash
Mathew Hodson (mathew-hodson) wrote :

It would be nice if there was a SRU for trusty.

Mathew Hodson (mathew-hodson) wrote :

The patch added in vivid was wrong. It creates a new directory and adds the script to /b/completions/

Mathew Hodson (mathew-hodson) wrote :

The fix is in https://code.launchpad.net/~sdeziel/bash-completion/apt

There is a merge request waiting for review.

Changed in bash-completion (Ubuntu):
status: Fix Released → Triaged
importance: Undecided → Low
Brian Murray (brian-murray) wrote :

In addition to the directory being incorrect apt was never added to the completions/Makefile so wouldn't get installed.

Changed in bash-completion (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash-completion - 1:2.1-4.1ubuntu2

---------------
bash-completion (1:2.1-4.1ubuntu2) wily; urgency=medium

  * debian/patches/14-add-apt-bts747094.patch:
    - Fix add support for the new "apt" command. (LP: #1358154)
      Thanks to Simon Déziel for the initial work.

 -- Brian Murray <email address hidden> Wed, 12 Aug 2015 13:29:05 -0700

Changed in bash-completion (Ubuntu):
status: In Progress → Fix Released
Brian Murray (brian-murray) wrote :

I sent my updated patch fixing this bug to the Debian bug report. If anybody wants to create a debdiff for Trusty, I'll be happy to sponsor it.

Simon Déziel (sdeziel) wrote :

Thanks Brian. I'm attaching a debdiff for Trusty that would need some review/comments. Thanks in advance.

Brian Murray (brian-murray) wrote :

The debdiff looks fine however, the version number that you are using for the package in Trusty is incorrect as that same version already exists in Vivid. Instead, if we follow the https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation#Update_the_packaging you'll see that the recommendation is 2.1-4ubuntu0.1. This will be less than the version number in Vivid and is maintainable in that if there is another update to this back in Trusty we can use 2.1-4ubuntu0.2 etc....

Brian Murray (brian-murray) wrote :

I've uploaded this to the trusty proposed queue for review by the SRU team. Could you update the bug description with SRU information e.g. Test Case (mostly there) and Regression Potential. Thanks!

description: updated
tags: added: patch
description: updated
Changed in bash-completion (Ubuntu Trusty):
status: New → In Progress

Hello Bogdan, or anyone else affected,

Accepted bash-completion into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bash-completion/1:2.1-4ubuntu0.1 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 bash-completion (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in bash-completion (Ubuntu Trusty):
importance: Undecided → Low
Simon Déziel (sdeziel) on 2015-08-21
tags: added: verification-done
removed: verification-needed
Changed in bash-completion (Ubuntu Trusty):
assignee: nobody → Brian Murray (brian-murray)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash-completion - 1:2.1-4ubuntu0.1

---------------
bash-completion (1:2.1-4ubuntu0.1) trusty-proposed; urgency=medium

  * debian/patches/14-add-apt-bts747094.patch:
    - Add support for the new "apt" command. (LP: #1358154)

 -- Simon Deziel <email address hidden> Fri, 14 Aug 2015 08:03:55 -0700

Changed in bash-completion (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for bash-completion 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.

Changed in bash-completion (Debian):
status: New → Confirmed
laulau (olaulau) wrote :

there isn't any bash-completion for the apt command in vivid.

Dave Morley (davmor2) wrote :

It is fixed in wily

laulau (olaulau) wrote :

so we can't have this fix in the actual stable release, even in the -proposed repository ?

Changed in bash-completion (Debian):
status: Confirmed → Fix Released
affects: bash-completion (Debian) → apt (Debian)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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