apt-get tab from super user doesn't work

Bug #507191 reported by Gianfranco Costamagna
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: apt

from super user after writing "apt-get install" and pressing double tab, the system doesn't show the alternatives... (autocompletition doesn't work)

it works from normal user with "sudo apt-get install"

ProblemType: Bug
Architecture: amd64
Date: Wed Jan 13 21:52:16 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/apt-get
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: nvidia
Package: apt 0.7.23.1ubuntu2
ProcEnviron:
 SHELL=/bin/bash
 LANG=it_IT.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: apt
Uname: Linux 2.6.31-17-generic x86_64

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :
Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Could anybody assign this bug??? I think is really easy to solve...

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Just made a simply patch to make this work... I think bash-completion should be enabled vy default also for root user.

affects: apt (Ubuntu) → bash-completion (Ubuntu)
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Patch

tags: added: patch
Revision history for this message
Ralf Doering (rdoering) wrote :

I would vote against enabling bash completion this way for all accounts (not only for root). If you really need to work as root, I prefer to have an account that just works and does not need to have all bells and whistles switched on. The "Ubuntu way" of using root is via sudo, where bash-completion works as expected. If you want to enable it for root, just add it to roots .bashrc.

Changed in bash-completion (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
stimpak (vespenegeyser) wrote :

the issue still stands for me, since it works for the first command, but without the modification, it doesn't fill up follow up commands.

for example, as it is it, completes the command up until the first command (eg) sudo and after that you need to write manually (for example) apt-get install <package>

As you can imagine it trims down a lot the ability to use the terminal, which then gives a lot of pain, especially if you need to install numerous libraries for compilation purposes.

Maybe at least add, a hint, when a user tries to use that feature, to inform him whats he needs to do to activate the feature?

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

For developers doesn't matter how many people use root account and don't like sudo...

stimpak, why do you run sudo from a root account???

Just try to change the lines of your /etc/bash.bashrc or your /root/.bashrc file from
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi

to

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

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.