Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: History bug (Re: Completion debugging)



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 <C-x?>
Debugging output left in /tmp/zsh13117ls3
(listing omitted)
zagzig[112] ls <C-n>
zagzig[112] emacs /tmp/zsh13117ls3 ;: "ls -CF "<C-p>
zagzig[112] ls <wait a few minutes, then RET>
(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



Messages sorted by: Reverse Date, Date, Thread, Author