zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH v2] Correct completion of 'tmux new <TAB>'.
Date: Tue, 25 Jul 2017 07:57:20 +0200	[thread overview]
Message-ID: <24145.1500962240@thecus.kiddle.eu> (raw)
In-Reply-To: <1500818487.2639605.1049794664.32ABA0EF@webmail.messagingengine.com>

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


  reply	other threads:[~2017-07-25  6:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20 21:06 Daniel Shahaf
2017-07-21  3:12 ` Bart Schaefer
2017-07-21 17:46   ` Daniel Shahaf
2017-07-23  7:48     ` Oliver Kiddle
2017-07-23 14:01       ` Daniel Shahaf
2017-07-25  5:57         ` Oliver Kiddle [this message]
2017-07-25 12:01           ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24145.1500962240@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).