> $^x is a syntax error, and not $x.
> $^x would be "whatever $ is" concatenated with literal "x"
> but "$" by itself is a syntax error

That's my point!

$-fu should be a syntax error, because is (our should be) equivalent
to $^-fu, an incorrect expression.

>From rc(1)
[...]
If  an unquoted word immediately follows a $ and contains a
character other than an alphanumeric, underscore, or *, a ^ is inserted
before the first such character.
[...]

But rc, I suppose, skip the first char next to $ in the search of a not 
alphanumeric, not * ... character.
If this is not a bug, but a feature, then it must be explained in rc(1), and 
for me, all the contiguous
characters of the same type (c>' ' && 
!strchr("!\"#$%&'()+,-./:;<=>?@[\\]^`{|}~", c)) should be skipped too,
so $--fu would be also correct.

For me the best is making $-fu a syntax error, and let the programmer decide if 
such an awkward name is
worthy of typing quotes everywhere.

trebol

Reply via email to