Root! Root! Root!
Peter Garrett
peter.garrett at optusnet.com.au
Tue Mar 15 15:51:33 UTC 2005
On Tue, 2005-03-15 at 10:34 -0500, Matt Price wrote:
> On Tue, Mar 15, 2005 at 12:35:07PM +1100, Cameron Hutchison wrote:
> > Once upon a time Senectus . said...
> > > On Mon, 14 Mar 2005 20:21:17 -0500, Xian <ulist at gs1.ubuntuforums.org> wrote:
> > > >
> > > > Try this from a normal terminal session:
> > > >
> > > > # sudo passwd
> > > >
> > > I have to say, one of the biggest reasons I don't like using sudo is
> > > that tab completion for bin files doesn't work..
> > > ie
> > > sudo apt-g then hit the tab key will not complete the command.
> > > unlike running the following as root:
> > > apt-g then hit the tab key...
> >
> > If you source /etc/bash_completion from your .bash_profile or .bashrc,
> > the completion will work for sudo commands (and many other things. eg.
> > try apt-get in<tab> and it will complete "install". apt-get remove <tab>
> > will complete on all installed packets, etc).
>
> ah, but sudo apt-get in<tab> will NOT work with bash completion -- at
> least, it doesn't work for me (bash 3.0-10, on debian sid, not
> ubuntu). anyone know enough about bash completion rules to say
> whether it's possible to write rules that would make something like
> that possible?
>
> Matt
>
> >
> >
>
> -------------------------------------------
> Matt Price matt.price at utoronto.ca
> History Department, University of Toronto
> (416) 978-2094
> --------------------------------------------
>
> The following addresses are for you if you're an evil spambot:
> zeus at derailleur.org aardvark at derailleur.org
>
In /etc/bash.bashrc I have
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
And I find
sudo apt-get in<tab>
works ( it seems to lag slightly compared to normal completion, but it
does expand to "install" )
Peter
More information about the ubuntu-users
mailing list