From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29863 invoked by alias); 8 Oct 2013 14:44:15 -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: 31799 Received: (qmail 19904 invoked from network); 8 Oct 2013 14:44:09 -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-b7ef66d00000795a-2a-52541a368fa6 Date: Tue, 08 Oct 2013 15:44:04 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Inconsistent history expansion of characters adjacent to histchar Message-id: <20131008154404.4e7e3ef7@pwslap01u.europe.root.pri> In-reply-to: <131008073126.ZM1910@torch.brasslantern.com> References: <131007195612.ZM1029@torch.brasslantern.com> <131008073126.ZM1910@torch.brasslantern.com> 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/4FV0zqZAgg/bLYhYHmx8yOTB6rDr4 gSmAMYrLJiU1J7MstUjfLoEr417fQvaCP+wVU/qfsjYwLmPrYuTgkBAwkZjyQbiLkRPIFJO4 cG89UJiLQ0hgKaPE7s7lTCAJIYHlTBKNG4tBbBYBVYnPjYdZQWw2AUOJqZtmM4LYIgLiEmfX nmcBsYUF/CSO71sJFucVsJf492YR2BxOAUuJM//vMUIs2MAo8XHNW7AifgF9iat/PzFBXGEv MfPKGahmQYkfk++BDWUW0JLYvK2JFcKWl9i85i3zBEaBWUjKZiEpm4WkbAEj8ypG0dTS5ILi pPRcI73ixNzi0rx0veT83E2MkBD8uoNx6TGrQ4wCHIxKPLwdvCFBQqyJZcWVuYcYJTiYlUR4 p/EDhXhTEiurUovy44tKc1KLDzEycXBKNTCeXZBw8z3LL+8meZ7TW08mROq3VT+ewsfFfLLr 9flpx5VeL+NbJZC8quC6yDlJhgWr13UwGJv7rnj/sO10raODe8Tc4lWte1r773wUmrqu4n6o 1o4goRr/ACGnbR6t806b9AgWzkp+vo+vmWG1jNgyiXMGRaHrpk+sKF71h0feaLqeosvbfTOU WIozEg21mIuKEwG45AfBHwIAAA== 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. pws