From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19557 invoked by alias); 26 Jan 2015 12:17:10 -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: 19781 Received: (qmail 10944 invoked from network); 26 Jan 2015 12:16:56 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc86d0000066b7-66-54c62fa27098 Date: Mon, 26 Jan 2015 12:16:49 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: refering to 2nd from last history parameter? Message-id: <20150126121649.684c22cb@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsVy+t/xy7qL9I+FGPT2aVvsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGe03XzMXPGCtmHlnJWsD4zGWLkZODgkBE4m/5+cyQ9hiEhfu rWfrYuTiEBJYyiixqv8eI4SziEmi5elWFghnG6PExNWP2UBaWARUJVb8WwY2ik3AUGLqptmM ILaIgKjE8hWb2bsYOTiEBSwlHu9xBQnzCthLtDTvBivhFLCRuLC4nRli5lZGiVm/T7GDJPgF 9CWu/v3EBHGSvcTMK2cYIZoFJX5Mvge2i1lAS2LztiZWCFteYvOat2AvCAmoS9y4u5t9AqPQ LCQts5C0zELSsoCReRWjaGppckFxUnqukV5xYm5xaV66XnJ+7iZGSNh+3cG49JjVIUYBDkYl Ht4TvMdChFgTy4orcw8xSnAwK4nwOqoDhXhTEiurUovy44tKc1KLDzEycXBKNTDe+vZj7+nZ 0X8lvAUiN2Sd+Hsn1EeguJNVavJrg0PBBgvNT836M5X/Jc/Hq5az7swROc44zefohWCW7t+n MpR8F7f+Er5YvfYZw8YF8b886tembhUN4ff8fr9626I5DcG5K+Nk688u8w7wMQ78uUvkkNSb q1u17nrqtD633Jv2bnXn7FZGj9JtSizFGYmGWsxFxYkAV0H/kzkCAAA= On Mon, 26 Jan 2015 12:05:14 +0000 zzapper wrote: > Still think it's a pity that there's no !$-1 , !$-2 etc The summary of the discussion is that there is, but it means the wrong thing: "-" is always a range in history arguments. Clearly this isn't what you actually want here, or ever would. We could special case the meaning here: given that ranges have to be in order, a range starting with "$" is by definition useless. It's a bit kludgy but this is !-history so it's hard to imagine anyone looking for elegance. Does this break anything? I was wondering about using a different character, but I think any solution where "minus" is not encoded by "-" is too obscure to be useful. pws