From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2401 invoked by alias); 15 Mar 2015 18:41:01 -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: 34713 Received: (qmail 29997 invoked from network); 15 Mar 2015 18:40:44 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [86.6.153.127] X-Spam: 0 X-Authority: v=2.1 cv=S8BXwecP c=1 sm=1 tr=0 a=39NrsSuza2clQiZR/7fYWQ==:117 a=39NrsSuza2clQiZR/7fYWQ==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=q2GGsy2AAAAA:8 a=1WzWd1RfWq-NoywgAQsA:9 a=CjuIK1q_8ugA:10 Date: Sun, 15 Mar 2015 18:35:01 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: Attempt to document aliasing more fully Message-ID: <20150315183501.12dda876@ntlworld.com> In-Reply-To: <150314135406.ZM26021@torch.brasslantern.com> References: <150314135406.ZM26021@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 14 Mar 2015 13:54:06 -0700 Bart Schaefer wrote: > So here is what I have (see diff below). This describes the situation > prior to workers/34641. To keep 34641, we'd just have to add another > itemiz() calling out command separators as a separate class of "word", > though I still think that if included, those should (a) still exclude > newline and (b) require "alias -g". Thanks, that looks reasonable. I'd sort of vaguely be inclined to point out a bit more actively that if you're aliasing quoted stuff the quotes form part of the alias (which is kind of weird if your use to shells written by normal people) and maybe hint what therefore doesn't get aliased (though I entirely agree with the basic logic, i.e. spelling out what does), but that's very minor. I've got no very strong feelings about keeping the new feature since it's been the way it has for decades and it only got noticed as a side issue. However, the limitations above sound sane, since using "alias -g" is already for hotheads, so maybe that's a good compromise. > Either way I rather suspect that POSIX_ALIASES should prohibit more > than just the reserved words, e.g., I doubt that parameter references > and quoted strings are meant to be allowed in aliases by POSIX. That > should get fixed, along with the bug(s) mentioned in 34668 and 34682. Yes, I agree with that. pws