From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19618 invoked by alias); 3 Feb 2014 22:20:29 -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: 32346 Received: (qmail 19541 invoked from network); 3 Feb 2014 22:20:24 -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.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=R9eZYQu302N287Bkur3kVyVpUevum5a1vYYJ5Ia27UU=; b=bIIIraGORUqb4+uJxcqM1wvOdmCFY5tsLMRAVLLRQVVpQB9YMk9E5zUSq1IswQcnxn xueOm5toHpctHJqyaRnMVkuITMD5ZTgd5QW1xUZpoohtp0aBaGflaVoFceamjbO12ZZa pWrLmN9EYf+diVVZ05i1CyynbXB9Y3CBSYHdm6gvZsoTdtJKurqMtJ7NpL2O19tN2ZZQ KjYTGItLxbxhzWoDOOggl4y1UYZ++YaWmuWrJfW+RGlWU9HtHhdy2HO+ZzaTBuuOHR1N ZerrlU8IOwxgJmOuavPGna63xblRWeuIsaG56uBrNfqRnh+yWryL9W8oJUowjm08jW8c ZVIw== X-Gm-Message-State: ALoCoQmhnxOQYGjV8xfO2RUn55nmEwBztngNtXW2BF2+ye2xuvVmn591eAKZzfY/Z8TVq/oGbzKc MIME-Version: 1.0 X-Received: by 10.112.140.202 with SMTP id ri10mr25846419lbb.9.1391466020454; Mon, 03 Feb 2014 14:20:20 -0800 (PST) In-Reply-To: <16516.1391462981@thecus.kiddle.eu> 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> Date: Mon, 3 Feb 2014 14:20:20 -0800 Message-ID: Subject: Re: zle: vi mode: wrong undo handling on fresh lines From: Bart Schaefer To: Zsh hackers list Content-Type: multipart/alternative; boundary=001a11c25deaddd92904f187edd1 --001a11c25deaddd92904f187edd1 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 3, 2014 at 1:29 PM, Oliver Kiddle wrote: > > It really ought to be possible to redefine complete-word. The following > works with old-style completion but not with the new. Anyone have an > idea why? > > complete-word() { > zle .complete-word > } > zle -N complete-word > 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". The second possible problem is that you've changed complete-word from a completion widget (defined with "zle -C") into a normal widget. It mostly works to call completion widgets from normal ones (though not the other way around) but you have to be careful, and you might need to make calls to the special auto-suffix-* widgets at the right times. 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 but I'm not certain. --001a11c25deaddd92904f187edd1--