From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27298 invoked from network); 22 May 2007 05:55:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 May 2007 05:55:50 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 54036 invoked from network); 22 May 2007 05:55:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 May 2007 05:55:44 -0000 Received: (qmail 12606 invoked by alias); 22 May 2007 05:55:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23454 Received: (qmail 12593 invoked from network); 22 May 2007 05:55:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 22 May 2007 05:55:41 -0000 Received: (qmail 53775 invoked from network); 22 May 2007 05:55:41 -0000 Received: from redoubt.spodhuis.org (HELO mx.spodhuis.org) (193.202.115.177) by a.mx.sunsite.dk with SMTP; 22 May 2007 05:55:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=first1; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=Gn/JtBHo88x6R1kP1029sJ8Cqn+ce5jUP2A/+lxSqWWh6DE5L3MiqLbWZCWDS0MaV4x/AJsCCp+hg1GUZu+RhBcSBeYcdjL4BojXAHrH4vYZZ378yih5ZNTpdWN6a1mEJr1b21MPNiBn582vczDX9O+He2fmVZRJtUX+a2zaWBs=; Received: by smtp.spodhuis.org with local id 1HqNLN-000Jjd-FV; Tue, 22 May 2007 05:55:37 +0000 Date: Mon, 21 May 2007 22:55:37 -0700 From: Phil Pennock To: Zsh-Workers Subject: Re: bindkey history-beginning-search-backwards; echo $widgts = crash Message-ID: <20070522055537.GA75016@redoubt.spodhuis.org> Mail-Followup-To: Zsh-Workers References: <20070521202131.GA14758@finlandia.home.infodrom.org> <20070522014632.GA11326@redoubt.spodhuis.org> <20070522033237.GA4576@finlandia.home.infodrom.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070522033237.GA4576@finlandia.home.infodrom.org> On 2007-05-22 at 05:32 +0200, Maddi Kopfermann wrote: > Am Montag, dem 21. Mai 2007 um 18:46 Uhr, Phil Pennock: > > > > history-beginning-search-backwards is not a standard widget; aside from > > this bug, you need to find which widget you really want. > > zsh -fc "bindkey '^o' history-beginning-backward && echo $widgets" > > crashes the shell > > zsh -fc "bindkey '^o' history-beginning-backwards && echo $widgets" > > crashes the shell > > zsh -fc "bindkey '^o' history-beginning-forward && echo $widgets" > > crashes the shell > > zsh -fc "bindkey '^o' history-beginning- && echo $widgets" > crashes the shell > > the attempt to let completion work crashes the shell. > > This is a bug when there is no widget with the supplied name; > > Sadly not only in that case! But, uhm, those aren't widgets; see zshzle(1) for details. history-beginning- would take you as far as history-beginning-search- but that's not a complete widget, there are four different widgets with that prefix. Well, okay, you might be set up to tab-complete further. But not in zsh -fc "cmd..." -- if someone has completion set up to correctly work recursively there, I'd like to know the settings. history-search-forward ? history-beginning-search-forward ? And also "-backward". Meanwhile, % zsh -fc "cmdname" will execute cmdname in a non-interactive shell and without any startup files you might have; but the variables inside that need escaping so that they'll be expanded by the non-interactive shell. I think you want: % zsh -fc 'bindkey "^o" history-beginning-search-forward; echo $widgets' And FWIW the supplied patch does prevent this crashing when given a bad name.