From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18415 invoked by alias); 28 Aug 2010 22:33:13 -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: 15341 Received: (qmail 5475 invoked from network); 28 Aug 2010 22:33:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.212.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=BkZKSY5qidaBPPkst95snDsZtJln4ono3qH0BOEpiPQ=; b=m2t+n5DhYECUVeTFvE/dkJFeNUK7SAlZQZ5R+21Pez6BQHPzhk2bmACq/zfPq/0WX4 LVujH68MknGw3+/UwMNJUTSrIYvpHY7VxNe1ZoF3Q8iSyGYbkP3UJ5KHgwiM8mRDaR79 I9PxTT7z4AA+ps3xwkfcxuyYytlRN+erUs26M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=r38kWz8k3oX1e6GNO8gUZTyrWDrzMuvbL6ewHrzjs8rhUubKRckqqY4NTuPAQSEdko SatI9aEEYuYQF3VaZEXVjuXTfq3wrgev1N7viOL9omJSnZQKoO3lbzIOs296kDuXimpU cK6gB+rTDrs0AyEwIXBfbx0csF3iFTbGfIJoM= MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 29 Aug 2010 00:33:04 +0200 Message-ID: Subject: Re: Please fix history-search-backward/forward From: Mikael Magnusson To: Felipe Contreras Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 On 29 August 2010 00:23, Felipe Contreras wrote: > On Sat, Aug 28, 2010 at 11:55 PM, Mikael Magnusson wrote: >> On 28 August 2010 20:54, Felipe Contreras wrote: >>> zle says: >>> Search backward in the history for a line beginning with the first >>> word in the buffer. >>> >>> GNU readline says: >>> Search backward through the history for the string of characters >>> between the start of the current line and the point. > >>> [1] http://zsh.sourceforge.net/Doc/Release/User-Contributions.html >> >> I think you want history-beginning-search-backward/forward ? Changing >> the effects of a widget is (and I think I can say this quite safely) >> is not really an option. > > I already mentioned history-beginning-search-backward/forward > (history-search-end), the point is not how to do that. history-beginning-search-backward and history-beginning-search-backward-end are not the same. The one I mentioned is builtin and doesn't need any autoloads. > The point is that history-beginning-search-backward-end encompasses > the functionality of history-search-backward, so why not make > history-search-backward do the same as > history-beginning-search-backward-end, if no functionality would be > lost? They behave differently so I'm not sure what you mean. Trying to emulate history-search-backward behavior in history-beginning-search-backward(-end) would involve lots of awkward cursor movement to put it after the first word. OTOH, if you want the default bindings for ^[p and ^[n to be changed, I have no counter argument, but who even uses those keys for history movement? AFAIK, no other keys are bound to these widgets by default. (ran zsh -f and did a few alt-x where-is). -- Mikael Magnusson