magicant / yash

Yet another shell
http://magicant.github.io/yash/
GNU General Public License v2.0
346 stars 30 forks source link

Cannot expand `${0_1}` #29

Open magicant opened 1 year ago

magicant commented 1 year ago

(Issue migrated from https://osdn.net/projects/yash/ticket/39289)

I'm not sure if the paraneter name 0_1 is acceptable or not in the first place, but the current behavior is inconsistent anyway.

$ typeset 0_1=foo
$ export 0_1
$ printenv 0_1
foo
$ echo ${0_1?}
yash: parameter `0_1' is not set

Maybe there should be a way to expand a variable with an arbitrary name possibly including unusual characters. See also #28.