On 5/30/10 8:45 PM, Britton Kerin wrote:
> I like the programmable completion but I'm having some trouble getting it
> do do exactly what I want:
>
> I have a directory called fsbmk with links into my tree structure. I'd like
> all commands to fall back to looking here if they don't find anything else,
> or at least to merge all completion from this source with others.
>
> Problems:
>
> 1. Using complete -C whatever for every command in $PATH is too slow
> to do at startup. But I don't see another way to add compspecs for many
> or all commands.
>
> 2. I would like to operate without disturbing existing, potentially more
> specialized completion. The -D option doesn't work because it only
> applies when no compspec exists (I have some big library of compspecs
> from somewhere, though sorry I couldn't remember what). One can
> of course use parse the output of complete -p and make a wrapper
> function, maybe this is the best and intended mechanism. But its a
> little cumbersome.
You can either add completions from your own library (which will override
previously-specified completions) or remove the ones you want to override
with complete -r and let complete -D fill in the new ones as you go.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/