Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: syntactic trivia



2021-01-02 06:57:32 -0800, Ray Andrews:
[...]
>     [ true ] && do-this\    # No comments here, please.
>              || do-that
> 
> I wonder how much trouble allowing that would be.  Probably written in stone
> that it will never happen, still, it's an obvious exception and I'd guess it
> would only take five minutes to code, the parser just throws out any comment
> before throwing out the backslash and the newline.  A tiny luxury.
[...]

You can write it:

true &&
  do-this || # comment
  do-that

\ followed by a space is a quoted space like ' '.

-- 
Stephane




Messages sorted by: Reverse Date, Date, Thread, Author