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

Re: permission denied



> On 21/04/2023 14:33 Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> BTW, this hardly matters in practice but:
> 
> 4 /aWorking/Zsh/Source/Wk 0 % print -rl "Hello World"
> Hello World
> 
> 4 /aWorking/Zsh/Source/Wk 0 % $chain1
> "Hello World"
> 
> ... can the quotes be omitted from the output?  I tried: " chain0=( 
> ${(Qz)1} )  "  but then it broke into two words again. Not important but 
> if it can be done I'll take it.

Yes, you can do ${(Q)${(z)1}} which does the splitting, then removes the
quotes (without any more splitting).  The nested expansions are needed
because otherwise the (Q) happens before the (z) (search the zshexpn
manual page for "brain damage" for the ordering rules).

pws




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