ubuntu jaunty bash completion for sudo not enabled by default

Bug #345525 reported by Musthafa Meeran
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Debian)
Fix Released
Unknown
bash (Ubuntu)
Invalid
Wishlist
Vincenzo Ampolo
Nominated for Jaunty by Vincenzo Ampolo
Nominated for Karmic by Vincenzo Ampolo

Bug Description

Binary package hint: bash-completion

I did a fresh install of Kubuntu Jaunty today and noticed that bash completion doesn't work with sudo, by default.

Web search found me this page - http://ubuntuforums.org/showthread.php?p=6923243

which says that the following code in /etc/bash.bashrc should not be commented.

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

But this is commented in a fresh install !!!

Could you please enable bash completion for sudo, by default ?

BTW, I am reporting this as a new bug, since the other bugs for this issue were closed.

Thanks a lot...

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: bash-completion 20080705ubuntu3
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: bash-completion
Uname: Linux 2.6.28-9-generic i686

Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :
Revision history for this message
James Westby (james-w) wrote :

This file actually comes from bash.

Thanks,

James

Changed in bash (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Changed in bash:
status: Unknown → New
Revision history for this message
stuartmarsden (stuartmarsden) wrote :

Can confirm this. This is a change from previous version config even if it did come from upstream. I think it should be restored. It is a real pain when doing sudo apt-get not to have completion.

Thanks for the resolution Musthafa un-commenting those lines restored the capability.

Revision history for this message
Vincenzo Ampolo (vincenzo-ampolo) wrote :

Hi, attached is a debdiff which solves this.

I've tested it in pbuider-dist jaunty and it installed correctly.

goshawk@earth:~/pbuilder/jaunty_result$ sudo dpkg -i bash_3.2-5ubuntu2_amd64.deb
[sudo] password for goshawk:
(Reading database ... 100175 files and directories currently installed.)
Preparing to replace bash 3.2-5ubuntu1 (using bash_3.2-5ubuntu2_amd64.deb) ...
Unpacking replacement bash ...
Setting up bash (3.2-5ubuntu2) ...

Processing triggers for man-db ...
Processing triggers for menu ...

Revision history for this message
Vincenzo Ampolo (vincenzo-ampolo) wrote :

Patch submitted

Changed in bash (Ubuntu):
assignee: nobody → vincenzo-ampolo
status: Triaged → Fix Committed
Revision history for this message
Siegfried Gevatter (rainct) wrote :

Musthafa Meeran: Did you really do a clean install or did you keep your /home directory? This is enabled in /etc/skel/.bashrc so should work by default for new users.

Vincenzo: Remember that "Fix commited" means that a new revision fixing this has already been uploaded, not that a patch is available :).

Changed in bash (Ubuntu):
status: Fix Committed → Confirmed
Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote : Re: [Bug 345525] Re: ubuntu jaunty bash completion for sudo not enabled by default

I remember doing a fresh install of Alpha 6 with a new /home dir.
I am currently using Intrepid and I can confirm that, even though
/etc/skel/.bashrc has it enabled, unless those lines are uncommented
in /etc/bash.bashrc, bash completion doesn't work !!

Revision history for this message
Vincenzo Ampolo (vincenzo-ampolo) wrote :

Hi. i did these tests:

1)Installing ubuntu jaunty from livecd in virtualbox and checking for ~/.bashrc it's there and bash completition works
2)installing kubuntu jaunty from alternate install in virtualbox and checking for ~/.bashrc it's there and bash completition works

So it seems that there are no problems in a fresh install.

About your system can you paste here the output of ls -lars ~/.bashrc and can you post your ~/.bashrc?

Can you finally do "cp /etc/skel/.bashrc ~" logout and login and test bash completition?

Thanks

Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :

I have a customized .bashrc in my homedir which is not same as
/etc/skel/.bashrc !!
Copying /etc/skel/.bashrc to ~/ works, but I don't remember whether
~/.bashrc was available in Alpha 6 installation.
If it is not a problem in the final release, then we can close this bug.

Thanks a lot....

On Wed, Apr 29, 2009 at 12:01 AM, Vincenzo Ampolo
<email address hidden> wrote:
> Hi. i did these tests:
>
> 1)Installing ubuntu jaunty from livecd in virtualbox and checking for ~/.bashrc it's there and bash completition works
> 2)installing kubuntu jaunty from alternate install in virtualbox  and checking for ~/.bashrc it's there and bash completition works
>
> So it seems that there are no problems in a fresh install.
>
> About your system can you paste here the output of ls -lars ~/.bashrc
> and can you post your ~/.bashrc?
>
> Can you finally do "cp /etc/skel/.bashrc ~" logout and login and test
> bash completition?
>
> Thanks
>
> --
> ubuntu jaunty bash completion for sudo not enabled by default
> https://bugs.launchpad.net/bugs/345525
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “bash” source package in Ubuntu: Confirmed
> Status in “bash” source package in Debian: New
>
> Bug description:
> Binary package hint: bash-completion
>
> I did a fresh install of Kubuntu Jaunty today and noticed that bash completion doesn't work with sudo, by default.
>
> Web search found me this page - http://ubuntuforums.org/showthread.php?p=6923243
>
> which says that the following code in /etc/bash.bashrc should not be commented.
>
> if [ -f /etc/bash_completion ]; then
>    . /etc/bash_completion
> fi
>
> But this is commented in a fresh install !!!
>
> Could you please enable bash completion for sudo, by default ?
>
> BTW, I am reporting this as a new bug, since the other bugs for this issue were closed.
>
> Thanks a lot...
>
> ProblemType: Bug
> Architecture: i386
> DistroRelease: Ubuntu 9.04
> Package: bash-completion 20080705ubuntu3
> PackageArchitecture: all
> ProcEnviron:
>  LANGUAGE=
>  PATH=(custom, user)
>  LANG=en_IN
>  SHELL=/bin/bash
> SourcePackage: bash-completion
> Uname: Linux 2.6.28-9-generic i686
>

Revision history for this message
Vincenzo Ampolo (vincenzo-ampolo) wrote :

bash completition is enabled by ~/.bashrc by default and it can be turned off depending from the user usage. enabling it in /etc/bash.bashrc is not a good behaviour cuz all the users will get bash completition, even the people that disabled it

Changed in bash (Ubuntu):
status: Confirmed → Invalid
Changed in bash (Debian):
status: New → 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.