Discussion:
[ast-users] .sh.match not set by case statements?
Aaron Davies
2015-10-20 02:07:18 UTC
Permalink
it looks like .sh.match isn't set by a match in the test of a case statement

is this expected?
cat ./a.sh
#!/usr/bin/env ksh
set -eu

print "${.sh.version}"

a=foo
[[ $a =~ f(.)o ]]
typeset -p .sh.match

b=bar
case $b in ~(E)b(.)r) typeset -p .sh.match;; esac
./a.sh
Version AJM 93u+ 2012-08-01
typeset -a .sh.match=(foo o)
typeset -a .sh.match=(foo o)
--
Aaron Davies
***@gmail.com
Loading...