On 10/9/06, Philip Ganchev <[EMAIL PROTECTED]> wrote: > On 10/8/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > [...] > > Currently, a backslash followed by a newline is interpreted as a > > newline in fish. This means that you can write e.g. > > > > pwd\ > > pwd > > > > and it will execute the 'pwd' command twice. > > > > However, this is not true in a quoted environment. Writing > > > > echo "hello\ > > goodbye" > > > > Will output > > > > hello\ > > goodbye > > > > and not > > > > hello > > goodye > > > > I'm proposing we change this, in order to make it possible to save a > > multiline command in the history by backslash escaping all newlines. > > This does not sound appealing from the point of view of syntax > simplicity. Having to escape backslashes gets complicated. Inside > quites at least, text should be taken at face value as much as > posible. This is violated with the $-construct, but there should be > as few exceptions as possible.
True, that is the downside with the escaping solution. > > How abot this. Write a comment with a time stamp before each command, > that begins with a signature like "fish command executed at " or > something like that. It would be easily parsable and documented. > Then perhaps the backslash escapes can be avoided. > 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: # EOB ls # EOB # EOB ls # EOB # EOB2 begin # EOB end # EOB2 Which I find extremely ugly. In comparison, I like the escaping soultion better. A third possibility I've considered is to escape each command in the history, but that would severely reduce the greppability of the history file. -- 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 Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users