On 10/9/06, Martin Bähr <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 09, 2006 at 11:54:38AM +0200, Axel Liljencrantz wrote:
> > If you did that, you'd have to somehow handle if the user writes out a
> > comment with a timestamp inside a command. The only real solution I
> > can see is something like what here-files use, namely using a magic
> > end-of-block marker, that is also given before each item. Something
> > like this:
>
> wouldn't it be enough if you only do this for strings?
> and then use " as the marker?
>
> in other words:
> # timestamp
> multiline\
> command\
> with "multi
> line
> string"
>
> the only problem i could see with that is if someone writes a single
> line command with a single quote:
> awk -F" foo
>
> but for that to work the quote would have to be escaped anyways:
> awk -F\" foo

This suggestion was made by Philip in as well. I just posted that
answer, so you may have sent this before recieving my reply to that
mail. Anyway, to save me some time, this is my reply to him:


I really don't want the history loader to understand shellscript.
Aside from code interdependency and other 'beauty'-issues, it would
also mean that the 'read' builtin would be broken, since it uses the
same code, but 'read' is for reading general purpose text, not
shellscript.

Also parsing shellscript to determine where blocks end would mean that
you can't insert unfinished commands into the history, as discussed
before. (Though I will note that you don't like that ferature, so this
is not a big problem for you)

Lastly, this would make the history file format very fragile. A single
bug or clumsy user edit could make fish unable to parse the remainder
of the file. File formats should be simple and robust.

>
> greetings, martin.
> --
> cooperative communication with sTeam      -     caudium, pike, roxen and unix
> offering: programming, training and administration   -  anywhere in the world
> --
> pike programmer   travelling and working in europe             open-steam.org
> unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
> administrator     (caudium|gotpike).org                          is.schon.org
> Martin Bähr       http://www.iaeste.or.at/~mbaehr/
>


-- 
Axel

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