Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Trying to reverse a word.
- X-seq: zsh-users 12059
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Zsh users list" <zsh-users@xxxxxxxxxx>
- Subject: Re: Trying to reverse a word.
- Date: Fri, 19 Oct 2007 20:07:03 -0700
- In-reply-to: <237967ef0710191501w1402669eh60c481a249c7ed6c@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0710191501w1402669eh60c481a249c7ed6c@xxxxxxxxxxxxxx>
On Oct 20, 12:01am, Mikael Magnusson wrote:
} Subject: Trying to reverse a word.
}
} % echo "${(j::)${(Oa)${(s::):-hello}}}"
} h e l l o
} What the heck is going on here?
The double quotes cause ${(Oa)${(s::):-hello}} to be joined with the
default IFS before the (j::) is ever applied. Add an (@) to force
that array to remain an array:
echo "${(j::)${(@Oa)${(s::):-hello}}}"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author