On Tuesday, 31 March 2015 16:13:18 UTC+1, Edward K. Ream wrote:
>
> On Tue, Mar 31, 2015 at 6:58 AM, jkn <[email protected] <javascript:>
> > wrote:
>
>> Hi Edward
>>
>> FWIW, I was the raiser of the original 'wishlist' bug about adding
>> command history. I have not yet said thank you for adding this ... because
>> IIRC your implementation didn't work (quite) as I expected it to! ;-o.
>>
>
> ​Hehe. Feel free to suggest improvements, including bug reports.
>
> My first reaction to command history was that it was going to be a minor
> feature. Nothing could be further from the truth. Many thanks for the
> original suggestion.
>
> Edward
>
Hi Edward
Perhaps a description of my expectations would help ;-). I have a notion of
a 'command history list' which is in general appended to:
- list starts off empty []
- enter command 'aaaa': command executed, list contains ['aaaa']
- enter command 'bbbb': command executed, list contains ['aaaa', 'bbbb']
- enter command 'cccc': command executed, list contains ['aaaa', 'bbbb',
'cccc']
- press up arrow: I am shown the last (most recent) in the list 'cccc'
- press 'enter'. 'cccc' is executed, but not appended to the list: ['aaaa',
'bbbb', 'cccc']
- press up arrow: I am (again) shown 'cccc'
- press up arrow again: I am shown 'bbbb'
- press up arrow again: I am shown 'aaaa'
- press down arrow: I am shown 'bbbb'
- I edit 'bbbb' to 'BBBB'. The command is executed, and the list contains
['aaaa', 'bbbb', 'cccc', 'BBBB']
- I press the down arrow: I am shown nothing (after each command is
executed my 'position' is at the end of the list)
(Some command history implementations 'wrap around' to the starting
command; I don't like this)
This matches most command histories I have used, I think. IIRC, the
difference between this and the current implementation seems to be around
the order in which commands appear in the command history list, and/or how
the up/down keys are used to navigate to previous/next command. I started
to take a look at the code but can't remember how far I got in
understanding your intentions, so thought this might be a better way of
reporting.
Oh, a possible useful addition is to have a way on *not* having a command
appended to the list. Bash does this if you start a command line with a
space. Either that or, say a shriek '!' prefix?
Thanks for your Command history work in any case!
Regards
Jon N
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.