Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: comments break \ at end of line
- X-seq: zsh-workers 12701
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Adam Spiers <adam@xxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: comments break \ at end of line
- Date: Fri, 25 Aug 2000 16:23:52 +0000
- In-reply-to: <20000825153830.C22595@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000824222932.A15971@xxxxxxxxxxxxxxxxxxxxxxx> <0FZU00LN0FYLHV@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20000825153830.C22595@xxxxxxxxxxxxxxxxxxxxxxx>
On Aug 25, 3:38pm, Adam Spiers wrote:
} Subject: Re: comments break \ at end of line
}
} I'm suggesting that, in the case of the function, it turns it into
} `echo hello, world', and in second case, it expects another line of
} input, just as if you hadn't entered the comment line. After all,
} comment lines are supposed to be ignored, aren't they?
No, comment *lines* aren't supposed to be ignored. *Comments* are
supposed to be ignored. A comment is everything from the # up to BUT
NOT INCLUDING the newline.
If the comment included the newline, all sorts of parsing would go wrong:
if test foo # comment
then
Would become:
if test foo then
Which is certainly not what you meant.
A comment beginning in the first column is treated the same as a comment
beginning in any other column, which I think IS what you want; you don't
want the syntax of your program changed by the introduction of leading
whitespace, do you?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author