zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH][doc] clarify order of backslash and prompt expansion in print -P
Date: Fri, 28 Jul 2023 15:54:51 -0700	[thread overview]
Message-ID: <CAH+w=7ZHcofP9JRXU+4GFrnc4sAs1aCaSDi+vgVoHE9=DhWNXA@mail.gmail.com> (raw)
In-Reply-To: <20230728094748.vmnnatnyxo7rs2v7@chazelas.org>

On Fri, Jul 28, 2023 at 2:47 AM Stephane Chazelas <stephane@chazelas.org> wrote:
>
> Also remind that you don't need to escape the backslashes if
> using print -rP

This is a good idea but I think the attempt to describe it could be clearer.

> +Prompt sequences undergo a special form of expansion.  This type of
> +expansion is also available using the tt(-P) option to the tt(print)
> +builtin, performed there em(after) backslash expansion unless used in
> +combination with the tt(-r) option

The "unless" here could be read as  "available unless used with -r"
rather than the intended "after backslash unless used".  I'd reverse
the order:

... builtin.  Unless used in combination with tt(-r) for raw output or
tt(-f) to specify a format string, backslash expansion occurs first.


      reply	other threads:[~2023-07-28 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  9:47 Stephane Chazelas
2023-07-28 22:54 ` Bart Schaefer [this message]

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='CAH+w=7ZHcofP9JRXU+4GFrnc4sAs1aCaSDi+vgVoHE9=DhWNXA@mail.gmail.com' \
    --to=schaefer@brasslantern.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).