zsh-users
 help / color / mirror / code / Atom feed
* quoting words
@ 2021-09-28 11:35 Pier Paolo Grassi
  2021-09-28 11:38 ` Pier Paolo Grassi
  0 siblings, 1 reply; 9+ messages in thread
From: Pier Paolo Grassi @ 2021-09-28 11:35 UTC (permalink / raw)
  To: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

Hello, I have something like
a=('aa bb' 'cc dd');

and I would like to get the quoted representation inside a string, so that

echo -e $b
'aa bb' 'cc dd'

or that

typeset -p b
gives
'''aa bb'' ''cc dd'''

I tried with

a=(sa\ bb cc\ dd); b="${(q+)a[@]}"; typeset -p b
typeset b='''sa bb cc dd'''

and other inconclusive variations

Pier Paolo Grassi

[-- Attachment #2: Type: text/html, Size: 896 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-28 20:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 11:35 quoting words Pier Paolo Grassi
2021-09-28 11:38 ` Pier Paolo Grassi
2021-09-28 12:19   ` Marc Chantreux
2021-09-28 20:10     ` Pier Paolo Grassi
2021-09-28 16:04   ` Bart Schaefer
2021-09-28 19:54     ` Pier Paolo Grassi
2021-09-28 20:09       ` Lawrence Velázquez
2021-09-28 20:10         ` Pier Paolo Grassi
2021-09-28 20:32         ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).