9front - general discussion about 9front
 help / color / mirror / Atom feed
* [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

9front - general discussion about 9front

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9front

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
		9front@9front.org
	public-inbox-index 9front

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9front


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git