Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: make history-complete-older do nothing on empty string
- X-seq: zsh-users 23343
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: make history-complete-older do nothing on empty string
- Date: Wed, 18 Apr 2018 10:45:55 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180418094559euoutp02d1b183e1f8f334e0449dc17552184608~mfqJCsdEM1046110461euoutp02O
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524044759; bh=2nMuZ90MOdYMeZQYvogdM0sKj1kneQZxnaZHdasX6xE=; h=Date:From:To:Subject:In-reply-to:References:From; b=eW1MOdaJn7/vekRgC6EgJFGiuUcykX4hk+jiNFEbPdJo7UTjWj6QNLinMKk5irmxN +0dTh+rV57T3SXOtDi0DgPjc/Aek4Tv8cN75xmV3uX7OBYYD9ZlSIeBeEPLtXYQfSH 5nDQa9t9akAAxI1EIyZn3yQyTtY+NovXOTJGda7k=
- In-reply-to: <87in8o6fjx.fsf@luffy.cx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CGME20180418052832epcas2p1df623a44c88edae226f65a2d5edc90f2@epcas2p1.samsung.com> <m3tvs9um1s.fsf@luffy.cx> <20180418094018.54559594@camnpupstephen.cam.scsc.local> <87in8o6fjx.fsf@luffy.cx>
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