Hello, I would like to propose an opt-in Bash option to allow non-ASCII characters in shell identifiers. The idea is not to change Bash’s default behavior. By default, variable names and other shell identifiers would remain restricted as they are today. The feature would only become active after an explicit user action, for example something like:
shopt -s unicode_identifiers The option should remain disabled in POSIX mode and when Bash is invoked as /bin/sh. Motivation: Many programming languages (even the kernel language Rust!) now allow Unicode identifiers. For interactive Bash use, teaching, local scripts, and non-English environments, it would be useful to allow identifiers such as: größe=42 π=3.14159 A conservative design could use Unicode XID_Start and XID_Continue rather than locale-dependent character classes. This would make the behavior more predictable across systems. Possible compatibility model: * default: current behavior * POSIX mode: current behavior * /bin/sh: current behavior * explicit Bash-only option: allow Unicode identifiers I understand that this raises questions around portability, parsing, locale handling, and Unicode confusables. That is why I think it should be an explicit Bash-specific opt-in feature, not a default behavior change. Would such a feature be considered acceptable for Bash if implemented carefully and accompanied by tests? Best regards, Luca Rodenhäuser
