Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ["regression"] Stéphane= 1 zsh -c 'echo $Stéphane'



06.10.2015, 18:44, "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>:
> This is discussed in the thread starting at workers/34004 and leading
> up to workers/34015.
>
> Nobody ever commented on whether the environment is allowed to contain
> names with the high-order bit set, but POSIX identifiers cannot, so it
> stands to reason you can't import something with that shape of name.

From the list of shells I have ${Stéphane} with Stéphane=2 in environment accept only tcsh and ksh now (LANG=ru_RU.UTF-8).

Not accepting: mksh, rcsh*, posh, bash, dash, fish.

No shell accepts this with LANG=C.

glibc+tcc+getenv() call is fine with this name even with LANG=C.

Note: I do not know which standard describes environment variable names and what exactly it says about the issue.

* Plan 9 rc reimplementation, uses name `rcsh` due to name conflict with openrc.

>
> zsh -f -o posixidentifiers -c 'Stéphane=2; echo $Stéphane'
> zsh:1: command not found: Stéphane=2
> éphane
>
> In effect the environment is always treated as POSIX_IDENTIFIERS.
>
> POSIX_IDENTIFIERS <K> <S>
>      When this option is set, only the ASCII characters a to z, A to Z,
>      0 to 9 and _ may be used in identifiers (names of shell parameters
>      and modules).



Messages sorted by: Reverse Date, Date, Thread, Author