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

Re: Metafication in error messages (Was: [PATCH] unmetafy Re: $var not expanded in ${x?$var})



On Fri, Feb 23, 2024 at 2:32 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> More relevant to this discussion is that math errors are one of the
> two existing callers using the %l format, so any attempt to improve
> this is going to require changing those calls anyway.
>
> we have just the one known case of wanting something different for
> ${var?msg}.
>
> There's exactly one case so far of wanting output to contain NUL, and
> per the "only caller can interpret" assertion, it seems worthwhile to
> use %l for the NUL case and let the other 3 callers decide to "nice"
> the strings they pass (or not).

That last sentence should be "other 3 calls" not callers (there are only 2).

Having worked out that issue with bin_print() [other thread], it
appears to me that NONE of the existing calls using %l want their
output nice'd (for example, the only way to get consistent readable
errors from math garble is to output the strings raw, or at least
something less than nice'd and yet to be determined).

This suggests strongly to me that changing %l and scrapping the %S
idea is the way to go.




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