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

Re: quoting words



yes this works fine:

a=(sa\ bb cc\ dd); a=${(qqq@)a}; typeset -p a
typeset a='"sa bb" "cc dd"'

Pier Paolo Grassi


Il giorno mar 28 set 2021 alle ore 22:09 Lawrence Velázquez <larryv@xxxxxxx> ha scritto:
On Tue, Sep 28, 2021, at 3:54 PM, Pier Paolo Grassi wrote:
> on 5-8 I get:
>
>> a=(sa\ bb cc\ dd); a=${(qqq)a}
>> typeset -p a                 
> typeset a='"sa bb cc dd"'

Perhaps it should have been ${(qqq@)a}?

% a=(sa\ bb cc\ dd); typeset -p a
typeset -a a=( 'sa bb' 'cc dd' )
% b=${(qqq@)a}; typeset -p b
typeset b='"sa bb" "cc dd"'

--
vq


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