From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4673 invoked by alias); 3 Feb 2014 23:32:26 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32347 Received: (qmail 24226 invoked from network); 3 Feb 2014 23:32:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1391469964; bh=AbLAUB/+3/I6FqIlv8+2A0aaZ1hTxvmyRCEDxHK8eiQ=; h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Received:In-reply-to:From:References:To:Subject:Date:Message-ID; b=eqRjOPD1C6b+vp4mCNjw6S+fPYCDrQSaKSI03O2Gum9qb6ESXCSpGUgPcyc0qZuMfKjR+WNOlzBa18xIuAS445om/whlrZQqA47HQWeuY7Swmx0PIDCm3hxGyMDiCU798gbt6zB/m2ori7Zac6VH8NvTZdCdRu8Ywq4FpzQLTms= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; b=PTcFco4pz9uyZsVV2tuqmAeXC3YB7G/BqgL5Ke3UFRC6Rwp1PwJCkR7hOz7n6lAPV7BsXHzMq3NV1tHZjuVpmmq1HZP68N0ojZV77CZ+Ee8XNCmwBWybpW2qOIAKWW+u/7flQdSVohs3TT8XtQEMy6A3oum+yoGqDnEsGr6zk+M=; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1391469964; bh=AbLAUB/+3/I6FqIlv8+2A0aaZ1hTxvmyRCEDxHK8eiQ=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Received:In-reply-to:From:References:To:Subject:Date:Message-ID; b=S+w1eB3CFb61clwSGrl1YdgVoz1SJam/Aaf/1WKNBmlU2flZHoSh4EPNBUSOO50njtOdla7em+eiGwAov/U39jqr18Q/9deX014NbXvrivGVgP23CO6n+6zo5Abgf5NO7TdFijKgyN8V7DJSuPkOeNGIiZzHN2SAzvEeRvSUgcE= X-Yahoo-Newman-Id: 231848.69515.bm@smtp149.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tBHHBfkVM1mww7U74onigADWIpigHfW.1ARr1wJnbVEYXKG uGZdVySDZ75OC1OFiX_kByv6_HLumBL02kLoMJgCLYi0BFARouCK8emYbM2U K2NVFwEBAp1zB8gBVh_bjoKgi_AdLFC6BJoUcSbS2Sma5r37_K1lxoQjzMUp UZvr2BXtVyPtK3skFvuqqIwjlIESD4Fd_L3gwvv_YzKcvcsi2Qv9JsnE4pm4 _FYCp.pfL6TBx.KJ9kOJRs3gJVZJ14Jq1GUlssbMgDaIzLTQmm0D_p1ZCvNM xc8He0JxxJM2kBgD32pKtEmwu260d7Ov5vGllpLX1EQuUsy.epWRkI8vd8ip ff1JeJ4__U34FKn0M0PCAf73i1nV3Azhz0nioxQ48k4qSlauA8iG4kuMAld1 QiE55pe_WveBt3nfmG1x5VTkC66x.Mf9EWuV.sMXY7fEScS2UD5dLLC4POSN 0DeKU0KmtwDRGDWZvUK_ATYPvcvFhj6EqiSk7e7iSPY3r85bvMSP0d5roBXL tWnM8QPyKq8rAjA9jYkiPMkL3FgY- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- X-Rocket-Received: from kiddle.eu (okiddle@95.222.210.25 with plain [188.125.69.59]) by smtp149.mail.ir2.yahoo.com with SMTP; 03 Feb 2014 23:26:04 +0000 UTC In-reply-to: From: Oliver Kiddle References: <20130923213014.15f97f9e@pws-pc.ntlworld.com> <3511.1390605547@thecus.kiddle.eu> <140125111530.ZM21792@torch.brasslantern.com> <20140127124301.4144f2d9@pwslap01u.europe.root.pri> <20140127161124.2aa16b37@pwslap01u.europe.root.pri> <2700.1390950035@thecus.kiddle.eu> <19068.1391204240@thecus.kiddle.eu> <19751.1391207572@thecus.kiddle.eu> <163F74F2-3FA8-4478-B354-491C006590C9@kba.biglobe.ne.jp> <16516.1391462981@thecus.kiddle.eu> To: Zsh hackers list Subject: Re: zle: vi mode: wrong undo handling on fresh lines Date: Tue, 04 Feb 2014 00:26:02 +0100 Message-ID: <17235.1391469962@thecus.kiddle.eu> Bart wrote: > The obvious reason is that "new completion" has already re-bound > complete-word to the _main_complete function. You can't override the > .complete-word form, so you're always going to bypass new completion when > running "zle .complete-word". Oh, of course. That makes sense. Thanks. > To get what I think you're after here, you'd more likely want > > complete_word() { > _main_complete "$@" > } > zle -C complete-word .complete-word complete-word I was trying to find a way to call split-undo before completion without binding tab to something that isn't named complete-word. This tends to help for older parts of the shell like incremental history searches that don't use their own keymap and I theorised that it might help on the second problem mentioned by Jun. However, menuselect and listscroll actually have their own keymaps so perhaps not. Anyway with the help of your hint, perhaps this: zle -C undo-complete-word .complete-word _main_complete complete-word() { zle split-undo zle undo-complete-word } zle -N complete-word Or perhaps the same but with a custom name for the function that is then aliased to complete-word with zle -A. With that, split-undo is interfering with AUTO_MENU. The following patch seems to sort that out. At least in my setup, it now seems to work. Oliver diff --git a/Src/Zle/iwidgets.list b/Src/Zle/iwidgets.list index 7872745..95cdca2 100644 --- a/Src/Zle/iwidgets.list +++ b/Src/Zle/iwidgets.list @@ -102,7 +102,7 @@ "self-insert-unmeta", selfinsertunmeta, ZLE_MENUCMP | ZLE_KEEPSUFFIX "send-break", sendbreak, 0 "set-mark-command", setmarkcommand, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_LASTCOL -"split-undo", splitundo, ZLE_MENUCMP | ZLE_KEEPSUFFIX +"split-undo", splitundo, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_NOTCOMMAND "spell-word", spellword, 0 "set-local-history", setlocalhistory, 0 "transpose-chars", transposechars, 0