Quoth Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>:
> ; fn a/b { echo 123 }
> ; a/b
> rc: can't open /env/fn#a/b: '/env/fn#a' file does not exist
> 123
> ; a/b
> 123
> ; du -a /env/ | grep '#a'
> 1 '/env//fn#acid'
Same thing for variables:
; a/b/c = 333
; echo $'a/b/c'
rc: can't open /env/a/b/c: '/env/a' not a directory
333
; echo $'a/b/c'
333
;
I guess it's not that weird. It's trying to create a file in a
subdirectory of /env which doesn't exist. As for why it only
complains about this once, look at /sys/src/cmd/rc/plan9.c:/^addenv;
it sets v->[fn]changed = 0 before trying to create the file under
/env.
The easiest thing to do would just be to disallow '/' in function or
variable names.