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

%! prompt code shows incorrect number



With two shells, incappendhistory and sharehistory active, this can happen:

PS1='%! '
29 echo right
right
31 echo $history[29]
echo left

Needless to say, this is surprising. Can it be fixed easily? fc -l reports:
   29* echo left
   30  echo right

Perhaps we could import events as numbers that are unused instead of
overriding the number we have told the user is going to be used for
the command they run?

(I am posting this without any investigation on my part as of yet, I
may look into it later...)
(If you're testing this in zsh -f, remember to: setopt rcs;
HISTSIZE=100; SAVEHIST=100; HISTFILE=/tmp/eventstest; setopt
incappendhistory sharehistory)

-- 
Mikael Magnusson




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