Zsh Mailing List Archive
Messages sorted by:
Re: compctl -l
On Oct 15, 11:37am, DervishD wrote:
} Definitely, if you ever come to Spain, I owe you a good dinner ;))
I'll keep that in mind.
} > compctl -l '' nohup noglob exec nice eval - time rusage
} Yes, this is another clear use I understood. The '-' doesn't
} confuse compctl?
It might confuse it if it were written in this order:
compctl -l '' - nohup noglob exec nice eval time rusage
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.
} > "compctl -x ... -l ..." is the real meat
} What confused me is the documentation about -l:
That documentation was written by another non-native English speaker,
so perhaps a bit is lost in the double translation.
} -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
} IMHO, this option doesn't really restricts what in the command
} line is an argument :???
When CMD is the empty string, it does. In that case, the arguments are
restricted to words 2 through the end (with the original command name
as word zero), and word 1, which would normally be an argument, is a
However, you're right that this is badly worded in the case where CMD
is not empty. It restricts the words considered to be arguments to
exactly the same set as before they were restricted, but changes the
interpretation of the word in command position.
I may be misremembering, but I think originally -l didn't have any
argument and always worked like the usage with an empty argument. The
doc thus was written for that case and then mutated to cover the other.
} 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.
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: