From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9408 invoked by alias); 15 Jan 2016 06:26:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37635 Received: (qmail 25383 invoked from network); 15 Jan 2016 06:26:50 -0000 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 autolearn=ham autolearn_force=no version=3.4.0 Date: Fri, 15 Jan 2016 06:26:48 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: bufferwords() lexes a subshell in a shortloop repeat as a string Message-ID: <20160115062648.GA14019@tarsus.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.23 (2014-03-12) The ${(z)} modifier gives me a subshell as a single unit: % pz() { print -rl - ${(qq)${(z)1}} } % pz 'repeat 3 (echo this is a subshell)' 'repeat' '3' '(echo this is a subshell)' I expected the subshell to be broken into '(', 'echo', …, ')' tokens, as per usual. Looking at it in gdb, I see (after the third call to ctxtlex()): tok == STRING tokstr == "(echo this is a subshell)" Cheers, Daniel