From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22740 invoked from network); 3 May 2000 16:57:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 May 2000 16:57:15 -0000 Received: (qmail 12099 invoked by alias); 3 May 2000 16:57:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11133 Received: (qmail 12064 invoked from network); 3 May 2000 16:57:05 -0000 From: "Bart Schaefer" Message-Id: <1000503165700.ZM21955@candle.brasslantern.com> Date: Wed, 3 May 2000 16:57:00 +0000 In-Reply-To: <200005030707.JAA06994@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "PATCH: Re: History bug (Re: Completion debugging)" (May 3, 9:07am) References: <200005030707.JAA06994@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: History bug (Re: Completion debugging) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 3, 9:07am, Sven Wischnowsky wrote: } Subject: PATCH: Re: History bug (Re: Completion debugging) } } > Why are there two of numbers 24, 29 and 32? In each case, the first of the } > two was inserted by calling "print -s ..." during completion. Apparently } > that doesn't work very well. } } Of course this isn't only in completion, but in every widget. } } The problem is that the history number for the currently edited line } is `reserved' and the `print -s' makes it be used. The patch below is } the simplest solution I can think of. OOOooh, this is fun. Change the "print -zR" in _complete_debug to "print -sR", and then: zagzig[112] ls Debugging output left in /tmp/zsh13117ls3 (listing omitted) zagzig[112] ls zagzig[112] emacs /tmp/zsh13117ls3 ;: "ls -CF " zagzig[112] ls (listing omitted) zagzig[114] history -d 113 09:48 emacs /tmp/zsh13117ls3 ;: "ls -CF " 113 09:51 ls zagzig[115] So there are still two 113s in the history list, but the prompt has the right history number. I'm expecting that particular shell to crash any time now ... -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com