readline/history size (PR#211)

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Tue, 22 Jun 1999 22:06:49 +0200 (CEST)


>>>>> seniorr  writes:

> Full_Name: Russell Senior
> Version: 0.64.0
> OS: linux-2.2.x
> Submission from: (NULL) (198.107.133.11)


> It appears that the GNU readline history size is limited to 50
> entries.  This is apparently occurring because R is not bothering to
> override the readline default value (from readline-4.0):

>   ./history.c:59:#define DEFAULT_HISTORY_GROW_SIZE 50

> It appears that it ought to be possible to override this from R by
> setting the readline variable `history_size' to another value.  I
> request that a command-line option be added for doing this.  The
> following is an *untested* patch:

> ...

I cannot confirm that the history size is limited to 50.  In fact, on my
system the size of the .Rhistory files can grow indefinitely.

I have (in r-devel) introduced the environment variables R_HISTFILE and
R_HISTSIZE, with defaults ".Rhistory" and 512.  Upon saving, the hist
file is truncated to R_HISTSIZE lines, which I think is the right thing.

Btw, history_size is not in the history API.

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._