Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
line continuation with sed
- X-seq: zsh-users 28201
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: line continuation with sed
- Date: Thu, 13 Oct 2022 11:25:56 -0700
- Archived-at: <https://zsh.org/users/28201>
- List-id: <zsh-users.zsh.org>
I'm wondering if this is a zsh issue or entirely sed's fault but:
$ var=$( print -l $var | sed \
-re 's/.../' \ # this is fine
-re 's/.../'\ # this throws an error
which I'd expect
-re 's/.../' \ # this throws an error ...
-re 's/.../' )
... if there is a bloody space AFTER the backslash and before the
newline. Thing is it's an invisible error, I just wasted the morning
with some sed errors which refused to be found because they were
invisible. What logic would make a space before the newline an error?
I'm thinking it must be a zsh issue because zsh is responsible for line
continuation. Multiple spaces between sed expressions are fine as one
would expect so if the backslash simply wrapped the line, there should
be no issue. Mind, haven't I whined about this before? Could there
ever be a situation where backslash-space-newline was not logically
reducible to backslash-newline? If there was such a thing, then of
course my complaint is void.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author