help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allowing dash in variable and function names


From: Koichi Murase
Subject: Re: Allowing dash in variable and function names
Date: Tue, 6 Apr 2021 14:19:09 +0900

2021年4月6日(火) 14:02 Eli Schwartz <eschwartz@archlinux.org>:
> On 4/5/21 9:53 PM, pauline-galea@gmx.com wrote:
> > Could gnu bash start allowing "-" in variable and function names
> > as with lisp?
>
> [...]
>
> Variables are, however, indeed forbidden to contain a dash either way.
> And it will never be added, because it would break backward
> compatibility. Previously existing code of the form

Personally, I don't see the necessity, but if some additional
separators in variable names are really useful for some people, ksh93
namespaces might be newly supported. ksh93 supports namespaces of
variables separated by dots.

ksh$ a=1
ksh$ a.hello=2
ksh$ a.world=3
ksh$ echo ${a.hello}
2
ksh$ echo ${a.world}
3

--
Koichi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]