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

Re: 2 questions



Peter wrote:
> > 2.) why is it that when I do history -f, I get dates and times that refer to
> > the latest login and not to the date and time of command execution in the
> > history.
> > 
> > For example,
> > 
> >   105  10/21/1995 09:44  cd News <--- this command was run 10/20 not 10/21
> >   106  10/21/1995 09:44  mail -f z <-- this is correct
> 
> Probably this is due to the problem with some versions of atol() which
> don't like the : following the history date and won't convert the
> number.  This may have been fixed by now.

I think that the problem is that you should use the extended_history option to
get meaningful timestamps.  Be default zsh does not save time information into
the history file and on the next login eralier commands are listed with the
time of the latest login.

>From zshoptions(1):

              EXTENDED_HISTORY
                     Save  beginning and ending timestamps to the
                     history file.  The format  of  these  times-
                     tamps     is    :<beginning    time>:<ending
                     time>:<command>.

Zoltan



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