Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Printf builtin missing v flag support
On 12/31/2015 08:55 AM, Eric Cook wrote:
> On 12/31/2015 02:16 AM, Starms, William Albert (MU-Student) wrote:
>
>> Is this just a feature that nobody noticed/cared about, or was there a reason for its omission? I couldn’t find anything on the subject, but I may just be bad at googling. I know printf can just be run in a subshell and captured, but forking for this seems like overkill, I say without any knowledge of the zsh backend.
>
> You can avoid the overhead of a subshell with something like
> % print -zf 'hello %s\n' foo;read -zr var; typeset -p var
> typeset var=foo
>
Copied and pasted from two different examples, but the code does indeed yield `hello foo', not just `foo'.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author