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

Re: Finding the first history event of the current instance



Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:

> On May 23,  4:22pm, Christian Neukirchen wrote:
> }
> } How can I list *only* the history lines that I typed into the current
> } session?  For this, it would be enough to find the first event of the
> } new instance, but $HISTCMD is not set at .zshrc yet.
>
> I presume this means you have INC_APPEND_HISTORY but not SHARE_HISTORY.

Exactly.  I just realized this already landed in zsh 5.0.8, sorry I
could not test it before.

It doesn't seem to work here:

juno ~% zsh
juno ~% fc -L -l
 8986  history -iDL
 8987  man zshall
 8988  zman history
 8989  fc -liD
 8990  fc -liDL
 8991  fc -liD -L
 8992  fc -lL
 8993  fc -lLI
 8994  zman fc
 8995  fc -L -l
 8996  fc -l
 8997  date
 8998  fc -l
 8999  fc -l -L
 9000  less .zshrc
 9001  zsh

I'd have expected it to print nothing, because the local shell history
is empty?

-- 
Christian Neukirchen  <chneukirchen@xxxxxxxxx>  http://chneukirchen.org



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