[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .octave_hist content
From: |
John W. Eaton |
Subject: |
Re: .octave_hist content |
Date: |
Tue, 11 Jan 2011 12:38:14 -0500 |
On 11-Jan-2011, Jordi Gutiérrez Hermoso wrote:
| and bash has a HISTCONTROL
| environment variable that lets you set options that do exactly that.
| It has an ignoredups option that doesn't save duplicate history lines
| and erasedups instead saves previous matching history lines. I think
| you want the ignoredups option. There is additionally a HISTFILESIZE
| variable that lets you control how large you want your history.
|
| Given how Octave's history editing is based on bash and bash already
| implements what you want, it may be possible to port more of bash's
| history-manipulating code into Octave. Do you need help understanding
| Octave's or bash's source code in order to accomplish this?
If you plan to do this, follow the lead of the
history_file/OCTAVE_HISTFILE and history_size/OCTAVE_HISTSIZE
function and environment variable pairs. I think I just never got
around to doing the HISTCONTROL variable, probably because at the time
handling a variable whose value could be a colon-separated list would
have taken more time than I thought it was worth given all the other
things to do.
Another option as a temporary solution: increase the size of your
history list, or compact the list yourself when you exit Octave. Even
a 100,000 commands would probably be less than a few megabytes and
memory is pretty cheap these days.
jwe
- .octave_hist content, CdeMills, 2011/01/11
- Re: .octave_hist content, Jordi Gutiérrez Hermoso, 2011/01/11
- Re: .octave_hist content,
John W. Eaton <=
- Re: .octave_hist content, CdeMills, 2011/01/11
- Re: .octave_hist content, John W. Eaton, 2011/01/11
- Re: .octave_hist content, CdeMills, 2011/01/11
- Re: .octave_hist content, John W. Eaton, 2011/01/12
- Re: .octave_hist content, Jordi Gutiérrez Hermoso, 2011/01/12
- Re: .octave_hist content, John W. Eaton, 2011/01/12