From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17432 invoked by alias); 18 Apr 2018 09:46:18 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23343 Received: (qmail 26173 invoked by uid 1010); 18 Apr 2018 09:46:18 -0000 X-Qmail-Scanner-Diagnostics: from mailout2.w1.samsung.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(210.118.77.12):SA:0(-6.9/5.0):. Processed in 14.686426 secs); 18 Apr 2018 09:46:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS,T_DKIMWL_WL_HIGH,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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= X-AuditID: cbfec7f2-5ffe19c000011644-ad-5ad713d587e6 Date: Wed, 18 Apr 2018 10:45:55 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: make history-complete-older do nothing on empty string Message-id: <20180418104555.25fef55b@camnpupstephen.cam.scsc.local> In-reply-to: <87in8o6fjx.fsf@luffy.cx> Organization: SCSC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsWy7djP87pXha9HGcztsLTYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4Mk4t7GEpWM5ZcbJ1BlMD4zb2LkZODgkBE4k3J5aA2UICKxgl Hl9N6GLkArK7mSTabt9l62LkACu69DcFIr6MUWL6340sEM4UJonfzb1sEM4ZRokv2xvZIZwL jBJTJjaxgcxlEVCVODD1ESOIzSZgKDF102wwW0RAVGL5is3sICuEBZwl1q2JAwnzApl3XvWB tXIKqEn8uTOXFaSEX0BI4kKzLcTV9hJH95xkgigXlPgx+R4LiM0soCmxdfd6dghbW+LJuwus IOdICExhk5i5sh3qGxeJ31tSIeYIS7w6vgUaEjISlyd3s0DUNzNKrL1/nw0i0cMoMWtxKIRt LdF3+yIjxAI+iUnbpjNDzOSV6GgTgjA9JJ6flIaodpTYc7eDFRIi5xkl7nw5xzSBUX4WkrNn ITl7FpKzFzAyr2IUTy0tzk1PLTbMSy3XK07MLS7NS9dLzs/dxAiM+NP/jn/awfj1UtIhRgEO RiUe3gUC16KEWBPLiitzDzFKcDArifDufHwlSog3JbGyKrUoP76oNCe1+BCjNAeLkjhvnEZd lJBAemJJanZqakFqEUyWiYNTqoHRmO8PQ8r1lX43dmS/2st1UvzUs9l+WXknJnJpfXuQfkzh o7zoo+lrz6bZHA4767drp+LHHRk9MUFLZPb8kOcKNfJrufNt89mWd7oMTvslLzCZXVvpvmRa s1VDzqRG58TnKionvmnvZfmaoPqU7e1a/2Wdbgw700LSI9Ztua3c4Jjn/kJv25QEJZbijERD Leai4kQAHyt5WPQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xy7pXha9HGTRfkrXYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4Mk4t7GEpWM5ZcbJ1BlMD4zb2LkYODgkBE4lLf1O6GLk4hASW MErcfHuXDcKZxiSxa+oDKOcco8SpM1tYIJwLjBKL9u8FaufkYBFQlTgw9REjiM0mYCgxddNs MFtEQFRi+YrNYCuEBZwl1q2JAwnzApl3XvWxgdicAmoSf+7MZYWYeZFRYsv+E4wg9fwCQhIX mm1BaiQE7CWO7jnJBNErKPFj8j0WEJtZQF1i0rxFzBC2tsSTdxdYQWwhoPiNu7vZJzAKzULS MgtJyywkLQsYmVcxiqSWFuem5xYb6RUn5haX5qXrJefnbmIEhuy2Yz+37GDsehd8iFGAg1GJ h3eBwLUoIdbEsuLK3EOMEhzMSiK8Ox9fiRLiTUmsrEotyo8vKs1JLT7EKM3BoiTOe96gMkpI ID2xJDU7NbUgtQgmy8TBKdXAGPsr8N0qZcODHSo6j7rZ05+Y6EeHTjTdXNrzp0J80+X6s9em SYi7x/vulfj5ZOYCS0PXKtsX1QvnlP2MM10VFriA4330t54dZw5/PXk095h9c+gNrd6u6/9W uCWeEXp3a+Ulnv+x619NdXCdf8nz1r3lvS37eT+dXjNVqFKXKUfh1/k5VvXKbkosxRmJhlrM RcWJAIDIgqFVAgAA X-CMS-MailID: 20180418094557eucas1p200ff5e9e58f039b15187195aa6af4c7f X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180418052832epcas2p1df623a44c88edae226f65a2d5edc90f2 X-RootMTR: 20180418052832epcas2p1df623a44c88edae226f65a2d5edc90f2 References: <20180418094018.54559594@camnpupstephen.cam.scsc.local> <87in8o6fjx.fsf@luffy.cx> On Wed, 18 Apr 2018 11:15:46 +0200 Vincent Bernat wrote: > =E2=9D=A6 18 avril 2018 09:40 +0100, Peter Stephenson > =C2=A0: >=20 > >> 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? =20 > > > > 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 =20 >=20 > 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