From: Han Pingtian <hanpt@linux.vnet.ibm.com>
To: zsh-workers@zsh.org
Subject: Re: array prepend
Date: Sat, 19 Jan 2013 15:53:21 +0800 [thread overview]
Message-ID: <20130119075321.GD2518@localhost.localdomain> (raw)
In-Reply-To: <87ip6veub2.fsf@lwm.klanderman.net>
On Thu, Jan 17, 2013 at 09:52:01AM -0500, Greg Klanderman wrote:
> Ahh OK, I see when SHWORDSPLIT is on, VAR+=$x does not perform
> splitting on $x but VAR+=($x) does.
>
Looks like when SHWORDSPLIT is on, both VAR+=$x and VAR+=($x) will
perform splitting on $x:
localhost% setopt shwordsplit
localhost% setopt
interactive
monitor
norcs
shinstdin
shwordsplit
zle
localhost% array=(foo bar);v="xxx yyy";array+=$v;print -l $array
foo
bar
xxx
yyy
localhost% array=(foo bar);v="xxx yyy";array+=($v);print -l $array
foo
bar
xxx
yyy
localhost%
next prev parent reply other threads:[~2013-01-19 8:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50EFB80D.30002@sergio.spb.ru>
[not found] ` <22417.1357954693@thecus.kiddle.eu>
[not found] ` <20130113185141.4394d532@pws-pc.ntlworld.com>
2013-01-14 1:50 ` Bart Schaefer
2013-01-14 15:48 ` Oliver Kiddle
2013-01-17 5:02 ` Bart Schaefer
2013-01-14 18:36 ` Greg Klanderman
2013-01-17 5:00 ` Bart Schaefer
2013-01-17 14:52 ` Greg Klanderman
2013-01-17 15:49 ` Bart Schaefer
2013-01-19 7:53 ` Han Pingtian [this message]
2013-01-19 16:41 ` Bart Schaefer
2013-01-20 11:08 ` Han Pingtian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130119075321.GD2518@localhost.localdomain \
--to=hanpt@linux.vnet.ibm.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).