zsh-workers
 help / color / mirror / code / Atom feed
From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Zsh-Workers <zsh-workers@sunsite.dk>
Subject: Re: bindkey <whatever> history-beginning-search-backwards; echo $widgts = crash
Date: Mon, 21 May 2007 22:55:37 -0700	[thread overview]
Message-ID: <20070522055537.GA75016@redoubt.spodhuis.org> (raw)
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-<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.


  parent reply	other threads:[~2007-05-22  5:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 20:21 Maddi Kopfermann
2007-05-22  1:46 ` Phil Pennock
2007-05-22  1:59   ` Phil Pennock
2007-05-22  9:29     ` Peter Stephenson
2007-05-22  3:32   ` Maddi Kopfermann
2007-05-22  5:37     ` Bart Schaefer
2007-05-22  9:27       ` Maddi Kopfermann
2007-05-22  5:55     ` Phil Pennock [this message]
2007-05-22 13:32       ` Maddi Kopfermann
  -- strict thread matches above, loose matches on Subject: below --
2007-05-15  9:59 PATCH: reverse matching (tentative) Peter Stephenson
2007-05-15 21:06 ` Matt Wozniski
2007-05-21  9:49   ` Peter Stephenson
2007-05-21 18:42     ` bindkey <whatever> history-beginning-search-backwards; echo $widgts = crash Maddi Kopfermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070522055537.GA75016@redoubt.spodhuis.org \
    --to=zsh-workers+phil.pennock@spodhuis.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).