On 9/22/06, Beni Cherniavsky <[EMAIL PROTECTED]> wrote:
> On 22/09/06, Philip Ganchev <[EMAIL PROTECTED]> wrote:
[...]
> > I think the history is conceptually a builtin, because you can't set
> > it (and should not be able to).  If possible, all variables should be
> > settable, to keep things conceptually simple.
> Why shouldn't I set it?  Sure, I can lose my history if I don't know

It's not very "user-friendly" (to use a cliche term) to let you do
that.  A computer should be forgiving of user errors and protect user
content.


> what I'm doing.  But it allows implementation in fish of powerful
> things like synchronizing your history accross multiple computers.

How -- by copying it across before you log out?  I guess this is an
argument for conceptual simplicity.  Of course, you can do the same by
first executing ``set history (history)''.


> The fact that we don't have a good use case doesn't mean nobody wants
> to set it.  Otherwise, why isn't make ~/.fish_history read-only too?

I guess because Fish needs to write to it, and it's easier this way.
As I see it, history is a record of what happened, and should not be
tampered with.


> > Sure, the output is an
> > array.  You can always access the n-th element using ``(history)[n]``,
> > so the cost in terms of verbosity is negligible.
> >
> Granted.  Though I'm slightly afraid the performance of
> ``(history)[n]`` will deteriorate as the history grows.

I guess this is a valid argument for arrays. With a builtin, ``history
n'' could access the first n commands, ``history -n'' the last n, and
``history n m'' the commands indexed m to n. Not very orthogonal, I
realize.

-------------------------------------------------------------------------
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