Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bufferwords() lexes a subshell in a shortloop repeat as a string
- X-seq: zsh-workers 37658
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
- Date: Sun, 17 Jan 2016 14:46:35 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=0lPxRYIDDfhtRYl4iEeAxisWHOcOH8x6X8tLJ1or8Qg=; b=bLoE3F8c+q1DhbwBdzrYqG74M7/CeG8+mQS8DK1/vi+Foob7UB0uTWcAIkfGdoqfbn aTaygGjR5N+G6X4qvIcRrtc7cJkG1/iQ1TMUd4dHzqk3u2NjMrJFHt9vHPor4jLE4Ajd Yt4nl9lBhQTfgW2MZw4rloAAwBInDUw1cLnXlENSVh883SD6i6/mXIXtyjUYdZtVU7y3 +Zb9vOG5xf2lfp2HAT7sCHmVJBzpu8EU0qQeV8q6Ox2/2rarotejKbJ1MMSY9h5bHJG9 x9AB45Ros/RvOPHlx/UIhUKlJqgPQJCALbEGJS/sA2OqmZUXVIAZt56Iqn187CY62zve 1YMA==
- In-reply-to: <20160117181647.49899357@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160115062648.GA14019@tarsus.local2> <20160115094117.5fcde75c@pwslap01u.europe.root.pri> <160115112516.ZM21347@torch.brasslantern.com> <20160117181647.49899357@ntlworld.com>
On Jan 17, 6:16pm, Peter Stephenson wrote:
} Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a str
}
} On Fri, 15 Jan 2016 11:25:16 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > On Jan 15, 9:41am, Peter Stephenson wrote:
} > } Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a str
} > }
} > } it's just splitting words, and (... ...) indeed works as a complete word
} >
} > Urk. That probably ought to be disabled, at least in shell emulation,
} > e.g. here is bash:
}
} shwordsplit does this. (I thought it would be shglob, but it isn't.)
Hrm. I see no evidence of that.
Src/zsh -f
torch% emulate sh
torch% print -l one (two three) four
one
(two three)
four
torch%
ARGV0=sh Src/zsh
$ print -l one (two three) four
one
(two three)
four
$
It appears that parens are still parsed as grouping, even though they
thereafter are considered a literal pattern character. E.g., I expected
"|" to be treated as a pipe in the following:
$ print -l one (two three|foo) four
one
(two three|foo)
four
Messages sorted by:
Reverse Date,
Date,
Thread,
Author