Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compctl -l



    Hi Bart :))

 * Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> dixit:
> }     Definitely, if you ever come to Spain, I owe you a good dinner ;))
> I'll keep that in mind.

    I'm a very good cooker, and my wife too ;)) At least, I'm better
at cooking than at zsh completion XDD

> } >     compctl -l '' nohup noglob exec nice eval - time rusage
> }     Yes, this is another clear use I understood. The '-' doesn't
> } confuse compctl?
> Once compctl begins parsing the list of command names, though, it won't
> change back to parsing options, so "-" is just another command name in
> the previous excerpt.

    Nice :) I took note for writing my compctl recipes ;)
> }     -l CMD
> }         This option restricts the range of command line words that
> } are considered to be arguments. [...] . Completion is then performed
> } as if these had been given as arguments to the CMD supplied with the
> } option.
> }     IMHO, this option doesn't really restricts what in the command
> } line is an argument :???
> When CMD is the empty string, it does.

    Of course, because then any argument is completed as a command,
but that's a very fixed restriction. From the docs I assume that with
-l I can specify which words are commands and which are not. But
really -x is needed for that...

> The doc thus was written for that case and then mutated to cover
> the other.

    Since compctl is currently deprecated, would do any harm if I
rewrite this bit of documentation (not in Yodl, please, although I
can try...)? Please take into account that I'm not english-speaking
and the resulting test may be even worse than the current... But
anyway if the patch may be accepted I can do.
 
> } Well, I must admit that my completion knowledge is worse than my
> } english, but I don't get the meaning of that... The completion is
> } performed in two ways: command-like or using 'CMD' completion :??
> It's trying to get across the notion that one word is completed as a
> command name (using "compctl -C") and then the rest of the words are
> completed as arguments of whatever command the first word names.  It's
> describing what happens with different cursor placements at the time
> completion is invoked.

    Excuse me for insisting, but really that cannot be done without
-x. I mean, without -x you can only handle special cursor placements
using '-l' with the empty string. That way, word 2 is considered a
command and completed as such. But if you specify a command in the -l
option, then the completion is just an alias (well, more or less),
but doesn't treat specially word 2,3,etc... Please excuse if I sound
clueless: I'm really clueless O:))

    Thanks as always for your invaluable help. I really owe you a
dinner. Or two... No joking ;)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/



Messages sorted by: Reverse Date, Date, Thread, Author