bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.1


From: Chet Ramey
Subject: Re: PROMPT_COMMAND='history -a; history -n' causes shell hang in OX 10.10 Yosemite / bash 3.2.53
Date: Wed, 05 Nov 2014 21:28:56 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/5/14 8:39 PM, Graham Jones wrote:
> Just out of curiosity, this mechanism is obviously something of a work
> around to give bash a single shared history in the same style as ksh had. 
> Has there ever been any thought of providing a mechanism to support a
> single history session in a more native way? I know that zsh has the
> setopt share_history option to provide this (as I’ve tried this before
> finding I can’t get on with zsh for other reasons). Is there something
> about the way the history works in bash that makes it difficult to implement?

In theory, one could change the functions in history.c and histfile.c to
change the in-memory history list to one that uses a file, possibly with
mmap().

I'd be happy to look at contributed code to do this, but implementing it
is not high on the list.

-- 
``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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]