From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18235 invoked by alias); 2 Dec 2014 00:10:22 -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: 19476 Received: (qmail 15114 invoked from network); 2 Dec 2014 00:10:21 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=AduIQRnG c=1 sm=1 tr=0 a=BXDGf7yJlKZnrui4jFm7DA==:117 a=BXDGf7yJlKZnrui4jFm7DA==:17 a=G8GL833Es-AA:10 a=IkcTkHD0fZMA:10 a=dKx-I_yGtUe5qmeQ_IAA:9 a=QEXdDO2ut3YA:10 Message-id: <547D0369.3060802@eastlink.ca> Date: Mon, 01 Dec 2014 16:10:17 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: trivial problem with histverify References: <547CCD76.2020806@eastlink.ca> In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit On 12/01/2014 03:26 PM, Mikael Magnusson wrote: > If histverify is set or not doesn't change the fact that !! in your > command will expand as normal. If you want to suppress history > expansion you either have to disable the banghist option, or quote the > history character (!). Long story short is: '[[:digit:]] !!' will do > what you want (double quotes do not stop history expansion). There's no issue with expansion, I want it to expand just as it does. Here's the binding: bindkey -s "\e[5~" '\C-a print -s \C-e\C-m history 1 | grep --color=auto "[[:digit:]] !!" \C-m' ... with 'histverify' off, it executes directly, on whatever text is on the command line, but with the variable on, I must press ENTER before it fires. I'm guessing that the code that handles 'histverify' sees the " !! " and so demands the ENTER, but I'd say that in this situation that shouldn't be required since no history command is actually being executed, it's just a listing of string matches. Or if it's agreed that that should indeed require the ENTER (when 'histverify' is active), I'm wondering if there's a workaround, so that my binding is exempt. (BTW the " [[digit:]] " is just to keep the search to the beginning of history lines, after the number.) BTBTW it seems a strange way to capture whatever is on the command line but " print -s " was all that I could find that worked at the time.