From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29724 invoked by alias); 8 Oct 2013 15:43:23 -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: 31800 Received: (qmail 3167 invoked from network); 8 Oct 2013 15:43:18 -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: cbfec7f4-b7f0a6d000007b1b-8b-5254281355c0 Date: Tue, 08 Oct 2013 16:43:13 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Inconsistent history expansion of characters adjacent to histchar Message-id: <20131008164313.23edae67@pwslap01u.europe.root.pri> In-reply-to: <20131008154404.4e7e3ef7@pwslap01u.europe.root.pri> References: <131007195612.ZM1029@torch.brasslantern.com> <131008073126.ZM1910@torch.brasslantern.com> <20131008154404.4e7e3ef7@pwslap01u.europe.root.pri> 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+NgFuphluLIzCtJLcpLzFFi42I5/e/4ZV1hjZAgg0tFFgebHzI5MHqsOviB KYAxissmJTUnsyy1SN8ugStj7d8mloIXnBXtNxuZGxivs3cxcnJICJhI3Oq8xgZhi0lcuLce yObiEBJYyihxadIFdghnOZPE+/lfWUGqWARUJY7/huhgEzCUmLppNiOILSIgLnF27XkWEFtY wE/i+L6VYHFeAXuJ2VsWAtkcHJwCDhL7e7MhZj5jlNj3+zUTSA2/gL7E1b+fmCCusJeYeeUM VK+gxI/J98BmMgtoSWze1sQKYctLbF7zlnkCo8AsJGWzkJTNQlK2gJF5FaNoamlyQXFSeq6h XnFibnFpXrpecn7uJkZICH7Zwbj4mNUhRgEORiUe3gf8IUFCrIllxZW5hxglOJiVRHhNZIFC vCmJlVWpRfnxRaU5qcWHGJk4OKUaGOO3SG2QXPpxWijDOZ+Flt+ZDWYa7Pj8PnjXzMCbGi+8 9eIeZPx/vnfJf5vFleIfurob1VqjOH/+OvFffMYfg8/fhc8u3vJ68VWBn4K6lzczTk5TV6g0 5tlgklrrYGTF85Fd9vLiPu89mTFf305W7ZYq2mL9eU2bf3ywZ/H/L/e3MfC/MhTSYVZiKc5I NNRiLipOBAC1l9OxHwIAAA== On Tue, 08 Oct 2013 15:44:04 +0100 Peter Stephenson wrote: > On Tue, 08 Oct 2013 07:31:25 -0700 > Bart Schaefer wrote: > > I'm wondering if backslash ought to be treated specially in more of the > > history code. In particular: > > > > torch% print !\!; print foo > > zsh: event not found: \! > > torch% > > > > One might think one could use that form to search for a command line > > that begins with a literal exclamation point, but no. > > Hmm... the documentation does indeed imply backslash is some sort of a > quote for history. Actually, I think it's just talking about escaping > the initial ! and then goes into its usual "it sort of vaguely works > like this but nobody ever really thought it through from beginning to > end" mode. However, you might think you were morally entitled to have a > backslash at that point either isolate the backslashed expression from > what went before (so it behaves just like a single !), or to be treated > as a string argument, and I would think the second, the one you > mentioned, is rather more useful. I put this badly --- I meant, of course, the "!" should be treated as a string argument, not the "\". pws