Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.0
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==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=0lPxRYIDDfhtRYl4iEeAxisWHOcOH8x6X8tLJ1or8Qg=;
        b=RuOZdD37Rtb58Gc7Cd2uvuNT4hK6OPaVnhsrBh6W2wfql1Vzoww6REDDan3jhoeDKK
         6PrtY2b6lb37h0Lrrs+8coAK733lUZxOqOKto7GztziTzz6XsrUHnRn/hlSCIMxY57ZM
         tpcEkR6UHFb4/YXXwvq0w3ElW7aHY0segAw0Lj6fHkvFaenO85CZyO3lIy1QA/IS/3OI
         ZcKjO4hLloDKp20wdjqDx7dqp8fpbNfjpWxOFEVwltcvQdbFT6HMZpAjVpac8kGcN+Tw
         io0QQsE1KqXSiJQX78D0Z/Gy/wy4JSXfL4ZdCv9h3htkW/MmcY0qro48czgBJrTUadjh
         QhyA==
X-Gm-Message-State: ALoCoQlapBtCF1aQ3l42qvOZJ6KroqiZNawtcfy+udgNm9gbbIQkZi4idLfWcAG6OnrjiS+R/+PuTqFcH7ZBRNy2p3qeRWnUGQ==
X-Received: by 10.98.64.6 with SMTP id n6mr31503430pfa.41.1453070770842;
        Sun, 17 Jan 2016 14:46:10 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160117144635.ZM3583@torch.brasslantern.com>
Date: Sun, 17 Jan 2016 14:46:35 -0800
In-Reply-To: <20160117181647.49899357@ntlworld.com>
Comments: In reply to Peter Stephenson <p.w.stephenson@ntlworld.com>
        "Re: bufferwords() lexes a subshell in a shortloop repeat as a string" (Jan 17,  6:16pm)
References: <20160115062648.GA14019@tarsus.local2> 
	<20160115094117.5fcde75c@pwslap01u.europe.root.pri> 
	<160115112516.ZM21347@torch.brasslantern.com> 
	<20160117181647.49899357@ntlworld.com>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37658

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@brasslantern.com> 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

