Extend bash completion

Hervé Cauwelier herve.cauwelier at nospam.free.fr
Mon Mar 7 18:27:21 UTC 2005


Gábor Iglói wrote:
> Hi!
> 
> I wonder if there's a package for extending the bash autocompletion
> feature in Warty or Hoary... It's annoying when typing sudo and then
> hitting the TAB furiously without any success :)

For a single session, I type:

. /etc/bash_completion

For activating it by default, edit .bashrc at the top of your home 
directory (note it's a hidden file). You may find references to that 
script, uncomment from the ligne "if [...]" to "fi" included.

If not found, add these:

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

Changes will take effect at next opened terminal.

> I think these settings are under /etc/bash_completion.d

These are the rules, call the bash_completion script to invoke them.

-- 
Hervé Cauwelier
http://www.oursours.net/





More information about the ubuntu-users mailing list