zsh-workers
 help / color / mirror / code / Atom feed
* comments break \ at end of line
@ 2000-08-24 21:29 Adam Spiers
  2000-08-25 10:32 ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Spiers @ 2000-08-24 21:29 UTC (permalink / raw)
  To: zsh workers mailing list

  % foo () {
  > echo hello, \
  > # this is a comment
  > world
  > }
  % foo
  hello,
  foo:3: command not found: world
  
which is the same issue as

  % echo hello, \
  > # comment
  hello,

This may be intentional, but if so, it strikes me as a rather
undesirable feature, or at least one which you should be able to turn
off.


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: comments break \ at end of line
@ 2000-08-25 10:35 Sven Wischnowsky
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Wischnowsky @ 2000-08-25 10:35 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> Adam wrote:
> >   % foo () {
> >   > echo hello, \
> >   > # this is a comment
> >   > world
> >   > }
> >   % foo
> >   hello,
> >   foo:3: command not found: world
> >   
> > which is the same issue as
> > 
> >   % echo hello, \
> >   > # comment
> >   hello,
> > 
> > This may be intentional, but if so, it strikes me as a rather
> > undesirable feature, or at least one which you should be able to turn
> > off.
> 
> I don't really see how it could be any different.  The `\' just skips the
> newline, turning the line into `echo hello, # this is a comment'.  `\'
> never forces it into any different state of parsing, it only escapes the
> next character.  What are you suggesting?  I don't see how you can turn it
> off without writing a completely new (= bugridden) way of lexing.

And the /bin/sh, ksh and bash here behave the same.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-08-25 16:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-24 21:29 comments break \ at end of line Adam Spiers
2000-08-25 10:32 ` Peter Stephenson
2000-08-25 14:38   ` Adam Spiers
2000-08-25 15:58     ` Andrej Borsenkow
2000-08-25 16:23     ` Bart Schaefer
2000-08-25 10:35 Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).