* Re: variables in ~ patternlists?
@ 1991-10-18 20:27 Rich Salz
0 siblings, 0 replies; 3+ messages in thread
From: Rich Salz @ 1991-10-18 20:27 UTC (permalink / raw)
To: byron, rc; +Cc: cks
Yes, the rule is simple and good. Thanks for explaining it in fewer
words so I can more easily remember it. :-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: variables in ~ patternlists?
@ 1991-10-18 20:18 Byron Rakitzis
0 siblings, 0 replies; 3+ messages in thread
From: Byron Rakitzis @ 1991-10-18 20:18 UTC (permalink / raw)
To: rc, rsalz
This is not how patterns work in rc; The only way to get
* to match any characters is for it to appear LITERALLY
and UNQUOTED. Therefore, only
~ foo.c *
will match, not
bar='*.c'
~ foo.c $bar
The only way to get around this is with an explicit eval
statement:
eval ~ $1 $foo
will present $foo to rc as if it had been rescanned (which
it is, actually).
I find these quoting rules to be quite simple, actually. Duff
explains them quite well in the paper bundled with rc-1.2.
^ permalink raw reply [flat|nested] 3+ messages in thread
* variables in ~ patternlists?
@ 1991-10-18 20:05 Rich Salz
0 siblings, 0 replies; 3+ messages in thread
From: Rich Salz @ 1991-10-18 20:05 UTC (permalink / raw)
To: rc
; z=('*.c' foo bar)
; echo patterns is $z
echo patterns is $z
; fn skip { ~ $1 $z && echo yes }
; skip foo
yes
; skip innd.c
;
I would expect a second "yes" reply. My mistake or rc's?
,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1991-10-18 20:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-10-18 20:27 variables in ~ patternlists? Rich Salz
-- strict thread matches above, loose matches on Subject: below --
1991-10-18 20:18 Byron Rakitzis
1991-10-18 20:05 Rich Salz
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).