|
From: | Reuben Thomas |
Subject: | Re: Default time for unmarked history lines |
Date: | Fri, 8 Jan 2016 13:17:46 +0000 |
I now understand your points.
dualbus@hp ...src/gnu/bash % cat ~/.bash_history
echo 1
#1452197044
echo a; sleep 1
#1452197045
echo b; sleep 1
dualbus@hp ...src/gnu/bash % ./bash -i <<< "HISTTIMEFORMAT='%Y-%m-%dT%H:%M:%S ' history"
dualbus@hp:~/local/src/gnu/bash$ HISTTIMEFORMAT='%Y-%m-%dT%H:%M:%S ' history
1 1969-12-31T18:00:01 echo 1
2 2016-01-07T14:04:04 echo a; sleep 1
3 2016-01-07T14:04:05 echo b; sleep 1
4 1969-12-31T18:00:01 HISTTIMEFORMAT='%Y-%m-%dT%H:%M:%S ' history
So, it seems that new entries are created with the localtime, unless there's a
history comment followed by a timestamp. I'm not sure what changes are needed
to adjust this, but I guess that is not a simple fix.
BTW, the timestamp = 0 thing is a bug in readline.
[Prev in Thread] | Current Thread | [Next in Thread] |