9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] rc(1) pattern-matching regression
@ 2022-02-15 10:53 qwx
  2022-02-15 20:37 ` cinap_lenrek
  0 siblings, 1 reply; 4+ messages in thread
From: qwx @ 2022-02-15 10:53 UTC (permalink / raw)
  To: 9front

Hello,

Pattern matching with lists no longer works:

	; ls /tmp/*.c
	/tmp/npage.c
	/tmp/pagedebug.c
	/tmp/pageold.c
	/tmp/scheduler.c
	/tmp/writeimagetest.c
	; ls /tmp/^(*.c)
	ls: /tmp/*.c: '/tmp/*.c' directory entry not found
	; 9fs dump
	; bind /n/dump/2021/1002/amd64/bin/rc /bin/rc
	; rc
	; ls /tmp/^(*.c)
	/tmp/npage.c
	/tmp/pagedebug.c
	/tmp/pageold.c
	/tmp/scheduler.c
	/tmp/writeimagetest.c

Thanks,
qwx

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

* Re: [9front] rc(1) pattern-matching regression
  2022-02-15 10:53 [9front] rc(1) pattern-matching regression qwx
@ 2022-02-15 20:37 ` cinap_lenrek
  2022-02-16 12:01   ` qwx
  0 siblings, 1 reply; 4+ messages in thread
From: cinap_lenrek @ 2022-02-15 20:37 UTC (permalink / raw)
  To: 9front

i see whats wrong.

we have to propagate the glob attribute thru lists
as well. before it was only handled for single words
and propagated thru concatenations... but didnt
consider lists... sorry :(

theres a patch that should fix it:

http://felloff.net/usr/cinap_lenrek/globfix.diff

the intend of the change was to not having to
bruteforce check the argument list for each Xsimple()
command for globs (which might have very large
argument lists coming from from a variable or
`{}, but instead only do the globbing
evaulation when actually needed (the expression
containing a glob, which is what the parser
knows).

--
cinap

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

* Re: [9front] rc(1) pattern-matching regression
  2022-02-15 20:37 ` cinap_lenrek
@ 2022-02-16 12:01   ` qwx
  2022-02-16 18:09     ` cinap_lenrek
  0 siblings, 1 reply; 4+ messages in thread
From: qwx @ 2022-02-16 12:01 UTC (permalink / raw)
  To: 9front

On Tue Feb 15 21:42:40 +0100 2022, cinap_lenrek@felloff.net wrote:
> i see whats wrong.
> 
> we have to propagate the glob attribute thru lists
> as well. before it was only handled for single words
> and propagated thru concatenations... but didnt
> consider lists... sorry :(
> 
> theres a patch that should fix it:
> 
> http://felloff.net/usr/cinap_lenrek/globfix.diff
> 
> the intend of the change was to not having to
> bruteforce check the argument list for each Xsimple()
> command for globs (which might have very large
> argument lists coming from from a variable or
> `{}, but instead only do the globbing
> evaulation when actually needed (the expression
> containing a glob, which is what the parser
> knows).
> 
> --
> cinap

Thanks, seems to work now :)

Cheers,
qwx

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

* Re: [9front] rc(1) pattern-matching regression
  2022-02-16 12:01   ` qwx
@ 2022-02-16 18:09     ` cinap_lenrek
  0 siblings, 0 replies; 4+ messages in thread
From: cinap_lenrek @ 2022-02-16 18:09 UTC (permalink / raw)
  To: 9front

ok, pushed a fix.

thank you for reporting!

--
cinap

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

end of thread, other threads:[~2022-02-16 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 10:53 [9front] rc(1) pattern-matching regression qwx
2022-02-15 20:37 ` cinap_lenrek
2022-02-16 12:01   ` qwx
2022-02-16 18:09     ` cinap_lenrek

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).