bug-bash
[Top][All Lists]
Advanced

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

Re: fallback programmable completion for many or all commands


From: Chet Ramey
Subject: Re: fallback programmable completion for many or all commands
Date: Thu, 03 Jun 2010 09:44:07 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

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    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]