|
From: Daniel J S. <dan...@ie...> - 2007-06-05 15:52:20
|
Petr Mikulik wrote:
>>I thought it was just an annoying bug that some of my commands seemed to
>>disappear. I never figured out any rhyme or reason to it.
>>
>>I strongly request that the default history behaviour is to leave
>>all my commands in place. I would consider this a bug-fix.
>>
>>I want it to behave like the csh [and tcsh and bash] history commands.
>>Go with what the users expect.
>
>
> I'm strongly against your proposal.
>
> Well, it was my first patch to gnuplot ages ago, to remove the repeated
> commands from the stack. I was so upset in a long night experiment at the
> ESRF having to hit dozen of times up-arrow before the actual plotting
> command appeared, that I started hacking gnuplot...
>
> I never used history to report what exactly I was doing. I need it to
> quickly go through the commands and have them available for editing, or with
> the "history" command to paste them via mouse.
I've programmed the condensed version during display rather than tossing out
redundant commands and that was *so* much easier. The only difference is that
the up-arrow that you mention, Petr, will still have to go through the full
list. (I could probably reprogram that as well to skip redundancy.)
I think it is easy enough to enable both with an option (full history stack,
default). In fact, I'd propose to deprecate
set historysize
in exchange for
set history {#(size)} {condensed|full} {quiet|numbered}
Picking syntax to reflect exactly the variables in gnuplot code inherently
limits future flexibility.
Then, as part of the history command, one could override the settings with
hi #
hi full num
and such.
Here are some other features I think worth having:
1) history clear
to clear out the history stack in case someone *does* want to use history like a
recording devise.
2) Some method of stepping through the history hunks at a time, say 10 or 20? I
don't know. It's just that some people really like working solely from the
keyboard as much as possible. For example, I explained before that I don't like
the fact the first plot in X11 terminal always grabs focus so that I have to
take my hand off the keyboard and press the mouse button to get back to the
command line. (I know, figure out what the window manager key sequence is to
push focus one window back.)
Dan
|