[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Adding a marker line to history at interactive shell sta
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Adding a marker line to history at interactive shell start (and history timestamps) |
Date: |
Tue, 26 Jun 2012 14:56:32 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 |
On 6/23/12 8:27 PM, Dennis Williamson wrote:
> I think setting the history comment character in conjunction with
> HISTTIMEFORMAT as you describe might be a good thing to do.
I think I'll do that.
> On other systems which have Bash 3.2.25(1)-release (IIRC), it works in
> that ~/.bash_history gets the right information. However, issuing
> history at the command line only shows the last commented line that's
> contained in the history list and none from the history file (without
> having tested the condition of none being present in the list since
> that's not relevant for this). Do you know why this may be and what
> might be done about it?
I can reproduce this using bash-3.2.51; I get all the lines except the
last commented one when I type `history' at the command line. I'll have to
look into it, but I will be very surprised if the comment character, since
it's the same as the history comment character, is not causing the line to
be mistaken for a timestamp. That check was tightened up between bash-3.2
and bash-4.0.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/