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

Re: [PATCH][doc] clarify order of backslash and prompt expansion in print -P



On Fri, Jul 28, 2023 at 2:47 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> 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.




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