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

Re: Printf builtin missing v flag support



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



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