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: Balaco Baco
Subject: Re: Savannah and (getting old) issue 108530 reported there
Date: Tue, 02 Jun 2015 06:24:30 -0300

I'm surprised to read you saying that this is not a problem with Bash.

I use Bash as my shell. As configure it (from its appropriate config
file). And I get results opposite to what would be expected. And you say
there is no problem with bash? Bash does not only deal with in memory
lists because it reads the history from the file .bash_history when we
open a new session. It will read history files with duplicate commands
it wrote before, although we configured for not doing this.

Bash has HIST_CONTROL, HISTFILESIZE and HISTSIZE (at least) to let us
control how *files* are kept, including history files (not only memory
commands).

I think it's a problem with Bash and that it should be addressed by
Bash, directly or not (since you point to Readline).

And keeping an open and apparently unseen issue in Savannah is bad. Even
if the decision would be what you said in this message, the assumed
improvement I had (and have seen in others) before posting it there
would not feel abandoned. Well, ...

-- 
  Balaco



On Fri, May 15, 2015, at 12:18, Chet Ramey wrote:
> 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/

-- 
http://www.fastmail.com - Does exactly what it says on the tin




reply via email to

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