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

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



Daniel Shahaf wrote:
> How about:
>
> item(tt(_cmdambivalent))(
> Completes the remaining positional arguments as an external command.
> The external command is completed as word-separated arguments (in the manner of tt(/usr/bin/env))

I'd just say that
   the external command and its arguments are completed as separate [positional] arguments
"word-separated" is a confusing term as "words" are not the separators.

> if there are two or more remaining positional arguments on the command line,
> and as a quoted command string (in the manner of tt(system+LPAR()...+RPAR())) othrewise.
Fine aside from the otherwise typo.

> See also tt(_cmdstring), tt(_cmdrest), and tt(_precommand).
Assuming those three exist both in form and documentation.`

> Makes sense.  In addition to checking for spaces, we could also check
> for an opening quote.  (An opening quote is more likely to signify a
> quoted shell command than an argv[0] with spaces.)

Yes, that makes sense.

> Why not document _precommand?  Firstly, documenting it would help

> Not quite what you meant to say, I think, but having that section of the
> documentation grouped by logical function would make a lot of sense.
> Right now, anyone who tries to understand _tags by RTFM'ing needs to

We currently document functions in three sections:
  CONTROL FUNCTIONS
  BINDABLE COMMANDS
  UTILITY FUNCTIONS
_precommand's primary purpose is not really as a utility function but
any function can be treated as one. Maybe we could add another section
or subdivide as you suggest. Certainly grouping all the tags/labels
functions together might be an improvement.

Oliver



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