Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: make history-complete-older do nothing on empty string



On Wed, 18 Apr 2018 11:15:46 +0200
Vincent Bernat <bernat@xxxxxxxx> wrote:
>  ❦ 18 avril 2018 09:40 +0100, Peter Stephenson
> <p.stephenson@xxxxxxxxxxx> :
> 
> >> I sometime hit M-/ by error and this invokes history-complete-older
> >> which then blocks when the current word is empty and it takes me
> >> 5-10 seconds to be able to "kill" it. Is there a way to teach this
> >> function to not complete anything on empty (or one-char) input?  
> >
> > I don't think that's a normal effect.
> >
> > You can try and debug it this way:
> >
> >
> > _debug_history() {
> >   _complete_debug _history_complete_word
> > }
> > debug_history .complete-word _debug_history
> > bindkey '^[/' _debug_history  
> 
> Not sure about the second line? debug_history doesn't exist. Shouldn't
> it be a "zle" command?

Sorry, yes, I tried this but copied it out of my history badly.  It's
got "zle -C" in front and there's an underscore (you should find
_debug_history is already autoloaded).  That's


_debug_history() {
  _complete_debug _history_complete_word
}
zle -C _debug_history .complete-word _debug_history
bindkey '^[/' _debug_history


pws



Messages sorted by: Reverse Date, Date, Thread, Author