[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: History changes
From: |
Rik |
Subject: |
Re: History changes |
Date: |
Thu, 20 Dec 2012 19:59:16 -0800 |
On 12/20/2012 03:52 PM, John W. Eaton wrote:
> On 20-Dec-2012, Rik wrote:
>
> | Also, should we have a sensible default value for N if history is called
> | with no input? Previously, it would display the entire history starting
> | from 1. This could be pages worth of text if you keep the default
> | history_size of 1024. Now, the default is 1 which produces just the last
> | command -- which is always history itself. This is odd. See sample
> | session below.
> |
> | octave:8> x = 1
> | x = 1
> | octave:9> history
> | 1033 history
> | octave:10> history
> | 1034 history
> |
> | I would think a value for N in the range of 10-20 would be a good default
>
> If we do that, then how do we get all of the entries? It is not the
> same as the value of history_size. That's the number of entries to
> save. You can have more in the current list than that. So I guess
> I'd vote for having history by itself just print or return them all.
There's a precedent for that. This is what Octave used to do and it's what
my tcsh shell does for the history command as well.
--Rik