From: Alex Musolino <alex@musolino.id.au>
To: 9front@9front.org
Subject: Re: [9front] rc fn weirdness
Date: Sat, 18 Sep 2021 12:18:05 +0930 [thread overview]
Message-ID: <B0C1239E2EEC372C66229C862FCC160F@musolino.id.au> (raw)
In-Reply-To: <CADuwikVA+zk6Dwz6C5K7dafmrBsgGZYE4uDxehqBuDjy34zY7g@mail.gmail.com>
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.
next prev parent reply other threads:[~2021-09-18 5:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 16:55 Sigrid Solveig Haflínudóttir
2021-09-18 2:48 ` Alex Musolino [this message]
2021-09-18 3:24 ` ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B0C1239E2EEC372C66229C862FCC160F@musolino.id.au \
--to=alex@musolino.id.au \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).