zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Matthew Martin <phy1729@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH 4/4] _normal: Add -P to reset precommands
Date: Tue, 2 Apr 2019 12:45:56 -0500	[thread overview]
Message-ID: <233414EF-D68C-4829-B2CC-A9841DCFCF2B@dana.is> (raw)
In-Reply-To: <20190402031310.GA60178@CptOrmolo.darkstar>

On 1 Apr 2019, at 22:13, Matthew Martin <phy1729@gmail.com> wrote:
>Add the ability to reset the precommands array to empty. Will be useful
>for zsh -c and perhaps some other situations. Again the texi is
>cargo-culted.

I like it. The documentation looks mostly OK to me, but:

>+xitem(tt(_normal) [ tt(-P) | tt(-p) var(precommand) ])(

I know it wasn't your fault, but i think this should be item()(), not
xitem()(). I don't fully understand the distinction, but xitem() seems to be
used only when there are multiple headings (describing different ways to use
the command); left here, it breaks the man-page formatting for the paragraphs
you added.

> completes after pre-command specifiers such as tt(nohup), removes the

Also not your fault, but this is the only place in the documentation
(including your changes) where 'pre-command' is hyphenated. Maybe fix that?

>+Append var(precommand) to the list of precommands. Should be used in
>+Reset the list of precommands. Should be used if completing a command

This clipped style (ommitting the subject of the sentence) isn't used anywhere
else in the documentation that i can see.

>+  '*::arguments: _normal -p $service'

The 'arguments' here is superfluous.

idk if you planned to do another pass, but i noticed several straight-forward
examples of other functions that could make use of `_normal -p`: _env,
_fakeroot, _nice, _stdbuf, _timeout, &c. _env is kind of a special case,
though, in that it (ab)uses _normal's standard behaviour to provide
variable-assignment completion too. Maybe there's a general solution for that

dana


  reply	other threads:[~2019-04-02 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02  3:13 Matthew Martin
2019-04-02 17:45 ` dana [this message]
2019-04-02 20:27   ` Daniel Shahaf
2019-04-03  2:01     ` Matthew Martin

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=233414EF-D68C-4829-B2CC-A9841DCFCF2B@dana.is \
    --to=dana@dana.is \
    --cc=phy1729@gmail.com \
    --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).