* Re: bug in ~ ?
@ 1993-05-27 4:53 Byron Rakitzis
0 siblings, 0 replies; 2+ messages in thread
From: Byron Rakitzis @ 1993-05-27 4:53 UTC (permalink / raw)
To: alan, rc
There are no heirarchical lists in rc. Therefore you can't embed the
null list in an argument list to anything.
~ takes just two lists as arguments. Maybe this will make things clearer:
~ foo (foo bar) (FOO BAR)
reduces to
~ (foo) (foo bar FOO BAR)
and evaluates to true. The arguments to ~ don't enjoy any special
property that you might imagine. They are just a word list.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug in ~ ?
@ 1993-05-27 0:44 Alan Watson
0 siblings, 0 replies; 2+ messages in thread
From: Alan Watson @ 1993-05-27 0:44 UTC (permalink / raw)
To: rc
; foo=()
; ~ $foo () bar && echo yes [a]
; ~ $foo () && echo yes [b]
yes
; ~ () () && echo yes [c]
yes
; foo=foo
; ~ $foo foo bar && echo yes [d]
yes
Question: why doesn't [a] echo yes?
This is what I think is going on: rc normally takes the arguments to a
command and makes them into a list, in the process of which any null
lists are eliminated. While this the behaviour one normally wants, it
doesn't seem right here.
rc doesn't seem to amalgamate the first argument of ~ with the rest (from my
reading of the grammar), so it is already a special case.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1993-05-27 4:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-05-27 4:53 bug in ~ ? Byron Rakitzis
-- strict thread matches above, loose matches on Subject: below --
1993-05-27 0:44 Alan Watson
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).