From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id FAA16190 for ; Sat, 23 Nov 1996 05:17:55 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA29974; Fri, 22 Nov 1996 13:06:42 -0500 (EST) Resent-Date: Fri, 22 Nov 1996 13:06:42 -0500 (EST) From: "Bart Schaefer" Message-Id: <961122100958.ZM6928@candle.brasslantern.com> Date: Fri, 22 Nov 1996 10:09:58 -0800 In-Reply-To: jdl@iasi.com ( JD Laub) "insert-last-word (was Re: zsh request)" (Nov 22, 9:09am) References: <9611221609.AA24586@c3po.iasi.com> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.820 20aug96) To: jdl@iasi.com ( JD Laub), zsh-workers@math.gatech.edu Subject: Re: insert-last-word (was Re: zsh request) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"rEDf11.0.GK7.nkUbo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2456 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 22, 9:09am, JD Laub wrote: } Subject: insert-last-word (was Re: zsh request) } } Bart Schaefer writes: } > not able to distinguish the 1 prefix from no prefix at all). } } Not that I'm objecting to the implementation, but I'm curious: gotmult } gets set if the user supplied a prefix, with zmult storing the actual } prefix. Am I missing something? No, I am. It's been so long since I changed any zle functions, I'd forgotten that it existed; there are only two places outside zle_vi.c where it's tested, so I didn't spot it when looking at other functions that use zmult ... I still think the way I did it is the best way, though. With gotmult, it could be changed so that -1 was the last word, -2 the second-last, etc., as with array subscripting; but since the name of the function is insert-LAST-word, I think it makes sense to count from the right without having to type that extra `ESC -'. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern