[Novalug] What is the name of this great feature in Ubuntu?

James Ewing Cottrell 3rd JECottrell3@Comcast.NET
Tue Jan 2 13:29:24 EST 2007


The feature is called something like "context completion" or 
"conditional completion".

As mentioned, zsh has some hooks to do this. So does (gulp) tcsh.

I would recommend against using any of these.

Completion is fine when expanding files, and maybe even commands (l s 
TAB, c h TAB, etc), but for arguments, hostnames, packages and other 
stuff, hitting the TAB key could buy you a long wait time when you hit 
the TAB key by mistake.

And the completion commands that hook all these things together are 
rather arcane as far as syntax goes.

In other words, Some Features Just Aren't Worth It.

Some problems are best solved in two steps.

JIM

Mark Smith wrote:

>bash gives you the ability to write scripts to complete anything you
>want.  it's kinda cool.  i've written scripts to do directory completion
>based on your cdpath, hostname completion, mutt completion (aliases and
>mailboxes), and others.
>
>the bash man page documents how to do this.  essentially write a script
>that sets the COMPREPELY array and hook it in using something like this:
>
>	complete -f -F complete_cdpath cd
>
>it's fun.
>
>  
>




More information about the Novalug mailing list