--- Begin Message ---
Subject: |
Re: Default time for unmarked history lines |
Date: |
Fri, 15 Jan 2016 10:26:04 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 1/11/16 11:54 AM, Reuben Thomas wrote:
> On 11 January 2016 at 14:22, Chet Ramey <chet.ramey@case.edu
> <mailto:chet.ramey@case.edu>> wrote:
>
> For a history file without any timestamps, using
> the current default and setting the history entry timestamp to the current
> time is more appropriate.
>
>
> Why is that? The only similar thing I can think of is file systems, where
> if you zero the metadata you get timestamps of the epoch, not the current
> time.
OK, consider the situation when a user has no timestamps in his history
file. There seem to be three choices for the timestamp: the epoch time,
which to me is clearly incorrect ("what? what is this 1970s stuff?"), the
last modified time on the history file itself, and the current time. I
left the default as the current time, so commands from the hsitory fi
>
>
> You probably also have histappend set or didn't use something like
> `history -w' to force the entire history file to be written when the shell
> exits.
>
>
> That's right.
Then you have presented the history library with an ambiguous situation.
>
>
> --
> http://rrt.sc3d.org
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
--- End Message ---