bug-bash
[Top][All Lists]
Advanced

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

Re: Savannah and (getting old) issue 108530 reported there


From: Chet Ramey
Subject: Re: Savannah and (getting old) issue 108530 reported there
Date: Fri, 15 May 2015 11:18:45 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 5/15/15 8:44 AM, Balaco Baco wrote:
> I have this issue, and talking with several people and searching around,
> I see that this seems to be a recurring problem for many users.
> 
> Some just "fix" it around by using a N times bigger history than they
> wished. Others just consider it a "bug that exists, but won't do nothing
> about it".

This isn't a bug.  Readline (and bash) only deals with in-memory history
lists -- the history facilities are not intended to, nor do they,
operate on disk files other than reading and writing them.  There are
also no facilities for sharing history files between sessions other
than synchronizing the history file after each command.

If you want to remove duplicates from a history file, you have to read
it into memory, use the existing history functions to operate on it,
and write it.  There is a program (hist_erasedups.c) in the readline-6.3
examples subdirectory that shows how to do that.

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



reply via email to

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