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

Re: [PATCH v2] Correct completion of 'tmux new <TAB>'.



On Thu, Jul 20, 2017 at 2:06 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> +item(tt(_cmdambivalent))(
> +Completes an external command.
> +If there is a single argument, complete the command in a single word, like tt(_cmdstring);
> +otherwise, complete the command in word-separated arguments, like tt(_precommand).
> +)

I believe I understand what this is doing, but "if there is a single
argument" isn't entirely clear.  It does NOT mean "if there is a
single positional parameter in the call to this function" (which is
how I first read it, before I actually looked at the function
definition); rather it means "if there is more than one word in
argument position on the command line".

Which in turn means this can only be used for argument-rest contexts, correct?



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