On 9/22/06, Martin Bähr <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 22, 2006 at 11:21:29AM +0300, Beni Cherniavsky wrote:
[...]
> yes, i also would like to be able to add commands to the history with
> out executing them. often i am working on a command, then i realize i
> need to do something else first. at that point it would be nice to
> add the command to the history to serve as memory and be able to come
> back to it later.

If you can store arbitrary text, it's more of a scratchpad than a
history.  How about using a delete buffer for it -- if the command
line had multiple buffers, you could paste from them in turn.
Wouldn't this be simpler?  With your proposal, the non-executed text
would be stored together with hundreds of executed commands, in the
order of writing on the command line.  How would you fish it out when
you need it -- string search?  How would you know whether a given
entry was actually executed?  How would you get a list of all executed
commands, if you needed?

> i also want to be able to execute some commands without having them
> added to the history.

Why? How would you do that with a history variable -- delete them
manually after they are added?  Is it worth the conceptual and
practical complication?  Some languages have a "dribble" command:
``dribble on'' turns logging on, ``dribble off'' turns it off.  (In
Lisp, logging includes the output.)  But the inconvenience is that you
have to know beforehand whether you want the command to be stored.


> the history ought to be a pool of resources available to you, and not a
> log of what happened.

I thought that different resources are used in different ways, and so
should be accessible separately.  But perhaps you are right that a
uniform way of using them might be simpler.

> (ok, maybe history is not a good name for it then,
> but if it's a log it certainly doesn't need to be kept in memory)

I think the reason it is kept in memory is low latency of access.
But, as I remember, reading the history file is the thing that most
slows down starting a new shell instance.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to