John wrote:
> Hi,
> 
> Bash's history command is behaving oddly.
> 
> If I do "history -w" then it writes the current history to
> ~/.bash_history as expected.
> 
> But if I do "history -a" then ~/.bash_history doesn't get changed, and
> from the modification time it hasn't been touched at all.

Look at bashhist.c:maybe_append_history().  If bash doesn't think there
have been any new history entries during the current session
(history_lines_this_session must be > 0), or if those entries aren't past
where we are in the history (history_lines_this_session must be
< where_history()), it won't write anything to the history file.

If you want to debug it, that's where I'd start.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/


Reply via email to