* [9front] rc oddity with quote and backslash
@ 2021-03-30 15:41 Xiao-Yong Jin
2021-03-30 15:55 ` Mark van Atten
2021-03-30 16:48 ` ori
0 siblings, 2 replies; 3+ messages in thread
From: Xiao-Yong Jin @ 2021-03-30 15:41 UTC (permalink / raw)
To: 9front
; xs=(a\
b\
c\
)
; echo $#xs
3
; xs=('a'\
rc: #d/0: syntax error
; xs=('a' \
'b' \
'c' \
)
; echo $#xs
3
The sequence of quote-backslash-newline somehow is not interpreted as quote-blank, but a syntax error. I don't think it's documented anywhere.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9front] rc oddity with quote and backslash
2021-03-30 15:41 [9front] rc oddity with quote and backslash Xiao-Yong Jin
@ 2021-03-30 15:55 ` Mark van Atten
2021-03-30 16:48 ` ori
1 sibling, 0 replies; 3+ messages in thread
From: Mark van Atten @ 2021-03-30 15:55 UTC (permalink / raw)
To: 9front; +Cc: Fans of the OS Plan 9 from Bell Labs
On Tue, 30 Mar 2021 at 17:52, Xiao-Yong Jin <meta.jxy@gmail.com> wrote:
>
> ; xs=(a\
> b\
> c\
> )
> ; echo $#xs
> 3
> ; xs=('a'\
> rc: #d/0: syntax error
> ; xs=('a' \
> 'b' \
> 'c' \
> )
> ; echo $#xs
> 3
>
> The sequence of quote-backslash-newline somehow is not interpreted as quote-blank, but a syntax error. I don't think it's documented anywhere.
>
Same result on p9p.
Mark.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9front] rc oddity with quote and backslash
2021-03-30 15:41 [9front] rc oddity with quote and backslash Xiao-Yong Jin
2021-03-30 15:55 ` Mark van Atten
@ 2021-03-30 16:48 ` ori
1 sibling, 0 replies; 3+ messages in thread
From: ori @ 2021-03-30 16:48 UTC (permalink / raw)
To: 9front
Quoth Xiao-Yong Jin <meta.jxy@gmail.com>:
>
> The sequence of quote-backslash-newline somehow is not interpreted as quote-blank, but a syntax error. I don't think it's documented anywhere.
>
It's definitely surprising -- but it's
not a syntax error. The '\' is part of
the quoted token.
% echo 'a'\
a\
% echo ''\
\
% echo abc\def
abc\def
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-30 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 15:41 [9front] rc oddity with quote and backslash Xiao-Yong Jin
2021-03-30 15:55 ` Mark van Atten
2021-03-30 16:48 ` ori
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).