[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Command arguments autocompletion



On Tue, Oct 13, 2009 at 9:24 AM, Matteo Riva <muradin@gmail.com> wrote:
> I noticed that in a shell I can use tab-complete even on command
> arguments, as in:
>
>  $ aptitude sa<TAB>
>
> will expand to
>
>  $ aptitude safe-upgrade
>
> How does this work?  Where does bash look for possible completion
> candidates?  Has it always been like this or is this a recently new
> feature (I could swear that this didn't work in the past)?
>

Install bash-completion

and uncoment this in ~/.bashrc

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

in ~/.bashrc

-- 
Reinaldo Orrego


Reply to: