Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: preserving single quotes
On Wed, Sep 28, 2022 at 5:13 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> I've done this before but I can't remember the invocation.
>
> $ dd="echo howdy"
>
> $ ee=$($=dd); echo $ee
> howdy
>
> $ dd="aptitude search '?name(libreoffice-java-common)'"
>
> $ ee=$($=dd); echo $ee
Use ${(Q)${(z)dd}} instead of $=dd. See `man zshexpn` for the meaning
of (z) and (Q).
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author