From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19465 invoked by alias); 8 Oct 2013 14:31:33 -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: 31798 Received: (qmail 18247 invoked from network); 8 Oct 2013 14:31:26 -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 From: Bart Schaefer Message-id: <131008073126.ZM1910@torch.brasslantern.com> Date: Tue, 08 Oct 2013 07:31:25 -0700 In-reply-to: <131007195612.ZM1029@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Inconsistent history expansion of characters adjacent to histchar" (Oct 7, 7:56pm) References: <131007195612.ZM1029@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Inconsistent history expansion of characters adjacent to histchar MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 7, 7:56pm, Bart Schaefer wrote: } } In short, the history parser has always been very ad-hoc and deviates } from its own spec in several ways. } } Here's a patch that fixes the unintended expansion, but it doesn't fix } the inconsistent behavior with !& !| et al. There should probably be } more method to this madness instead of multiple series of individual } character comparisons. Just to illustrate this further: torch% print !\; print foo zsh: event not found: \ torch% \print bar bar torch% print !\; print foo print \print bar; print foo print bar foo torch% 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.