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.
Another possibility would be to implement the history fileformat as I described in the previous post, but skip the part about allowing escaped newlines in quoted strings, since the history loader will strip away those slashes anyway. That would remove the language drawback, but would instead mean that you can not always directly copy and paste code from the history file into the commandline or a file, which is also bad. > > 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. > -- 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