Closed borkovic closed 8 years ago
Umm. It's a "feature", although an unfortunate one.
Lists are flat in rc, which means that there is no way for a list to contain the empty list. A list can only contain strings.
It should be documented though. I'll fix that. Thanks!
fixed in 43d2c19d
The man page gives an example for testing for undefined var:
~ $foo ()
. I tried testing for several values at once with one pattern being()
. Rc seems to ignore the pattern()
.The test against single
()
seems to be correct:I observed a similar behavior with
switch
.Did I miss something in the man page or is this a real problem? I suspect the patterns are combined into one list, and the middle element is omitted just as it would be for list
(1 () 0)
. It was a surprise though.