ksh93 / ksh

ksh 93u+m: KornShell lives! | Latest release: https://github.com/ksh93/ksh/releases
Eclipse Public License 2.0
192 stars 32 forks source link

bogus typeset -p output for compounds with disciplines #729

Open stephane-chazelas opened 8 months ago

stephane-chazelas commented 8 months ago
$ echo "${.sh.version}"
Version AJM 93u+m/1.1.0-alpha+9a48c61e 2024-03-07
$ c=(a=b; function get { :; } )
$ typeset -p c
typeset -C c=
$ d=(a=b)
$ function d.get { :; }
$ typeset -p d
typeset -C d=()

See also:

$ a=(typeset -A a=([a]=b); function get { typeset -p a; })
$ : $a
typeset -C a=
$ typeset -p a
typeset -x a=typeset -x a=

Which looks pretty random.

McDutchie commented 4 months ago

Identical symptoms in ksh 93u+ 2012-08-01 and in ksh2020.