|
From: | Reuben Thomas |
Subject: | Fwd: Default time for unmarked history lines |
Date: | Mon, 18 Jan 2016 16:53:16 +0000 |
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 history file
are the same as commands entered at the terminal.
> 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.
[Prev in Thread] | Current Thread | [Next in Thread] |