"Axel Liljencrantz" <[EMAIL PROTECTED]> writes: > Welcome back, John. Long time since your last post! > > On 2/18/06, John Brock <[EMAIL PROTECTED]> wrote: >> John Brock >> [EMAIL PROTECTED] >> >> On Fri, Feb 17, 2006 at 07:05:19PM -0500, Philip Ganchev wrote: >> > I dislike this because it is impossible to tell if a newline is >> > escaped or if one is escaping a space character. Though I've thought >> > about this for a bit and have come to the conclusion that this is an >> > editor issue. An editor could, if it wanted to, differentiatte between >> > the two, for example by highlighting the backslashed newline using a >> > different background color. >> > >> > I guess an otherwise rather sane syntax should not be punished because >> > editors are stupid.
A much bigger problem IMO is that fish doesn't parse \\, and to add compatibility you'd basically need a full \ parser (you'd at least need to understand \ EOL and \\, at which point you might as well add \n \t \b \r \0xx \xxx etc.). Also, personally, I don't see: echo a |; cat ...as anymore weird than: echo a ;;; ;;; echo b ...which is already valid. >> Personally I like "\" as a line continuation character. It's syntax >> that a lot of people are familiar and comfortable with. Because people generally, IMO, don't like half of an idiom. Having \ EOL behaviour is an overall part of \ processing that people understand ... having just one bit is going to be very confusing. >> So why >> not just make it the rule that fish discards all whitespace at the >> end of a line (unless you are inside a quote or something)? Which would make it's behaviour different from anything else that does \ processing. > That is an interesting idea. The benefits you outline above are > desirable. The result is however somewhat unintuitive in other cases. > Say that you want to replace all tabs in the output of grep with > spaces. An easy way to do this would be: > > grep WHATEVER | tr \t \ Even better is: foo | tr \t\ \\\ -- James Antill -- [EMAIL PROTECTED] http://www.and.org/and-httpd ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
