Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bindkey <whatever> history-beginning-search-backwards; echo $widgts = crash
- X-seq: zsh-workers 23454
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Zsh-Workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: bindkey <whatever> history-beginning-search-backwards; echo $widgts = crash
- Date: Mon, 21 May 2007 22:55:37 -0700
- 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=;
- In-reply-to: <20070522033237.GA4576@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Zsh-Workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20070521202131.GA14758@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20070522014632.GA11326@xxxxxxxxxxxxxxxxxxxx> <20070522033237.GA4576@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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-<TAB> && 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-<TAB> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author