From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12860 invoked by alias); 15 May 2015 01:35:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20217 Received: (qmail 12230 invoked from network); 15 May 2015 01:35:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 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=XBc1WO7OsfzLSn/+7EItgSHpy5sKE4E8HtdydDbl0+s=; b=Yry+Bu+eIp0g77yxUpDVSA6n1p6Ma2dEQ1UtDMS8wuCypY4CYS16nNY40Rn6nOQlpW oZD7eAIbMCMPZrfwukSrufUbqeR2m6+g0OdNfoyU3DE+IpbTiq9iQzyvdwjLOFvPKqK8 hZo2OFItbKUoLV5VwlmhcD1aGC3zVSCpwWpYM+FoLybJghyu8sArq/SRhR2qzWY0hGOM CRb7xN4Gye78ArsEM6Jr9gQgtJWqW1K/AxM4POMz6m3B3e+xBJG3HzL437mrYwzW5QXL 7sZd7WZAHfJTM9dkNWTghEbLXphnmmcznv5oSkut6Pdu+NfRD1EUYV7A55TOSTYIpcyA T+8A== X-Gm-Message-State: ALoCoQl/qT4mScNDWQf6Owb+vA8e2OXsq3SgIgOaAVvcMODs1LW4zVnaIg/8nqCZRiUguS0i8j5G X-Received: by 10.202.174.131 with SMTP id x125mr6013765oie.18.1431653704992; Thu, 14 May 2015 18:35:04 -0700 (PDT) From: Bart Schaefer Message-Id: <150514183502.ZM31123@torch.brasslantern.com> Date: Thu, 14 May 2015 18:35:02 -0700 In-Reply-To: <27692.1431650460@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: Seeking feedback word breaks and aliasing of tokens" (May 15, 2:41am) References: <150327090501.ZM4166@torch.brasslantern.com> <27692.1431650460@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Seeking feedback word breaks and aliasing of tokens MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 15, 2:41am, Oliver Kiddle wrote: } Subject: Re: Seeking feedback word breaks and aliasing of tokens } } > Note that a word break is introduced to the left of the expansion (because } > of '||'s original meaning as shell syntax) even though there are no spaces } > around the original usage; but no word break occurs to the right of the } > expansion. The proposal is for word breaks on both sides of the expansion } > (as is implied by recognition of a separately aliasable word). } } I'd agree that 34781 made sense in that having the word break on only } one side of the token after alias expansion is not consistent. Was the } preceding word break always there or intentional as part of the recent } changes? It was always there, and nearly impossible to remove without completely rewriting the parser, as far as I can tell. } The added word breaks do remove flexibility because you could always } have included them in the alias: alias -g '||'=' OR ' That introduces a different problem because an alias that explicitly ends with a space triggers alias expansion on the following word. } It seems redirections are also covered by this change but this looks } like a bug: } % alias -g '>!'='REDIR' } % echo one>!two } zsh: event not found: two } prompt.c:1539: BUG: cmdstack empty That has nothing to do with the alias, it's a completely different bug. schaefer[619] Src/zsh -f torch% echo one>!two zsh: event not found: two ../../zsh-5.0/Src/prompt.c:1539: BUG: cmdstack empty } You can't alias something like 2>&1 though. Correct, because that's three tokens "2" ">&" "1" and every alias has to be for a single token.