hush: treat ${#?} as "length of $?"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-07-25 15:18:57 +02:00
parent 64925384c9
commit 645c697372
5 changed files with 115 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
hush: syntax error: unterminated ${name}
0
1
0
====
_

View File

@@ -5,7 +5,7 @@
"$THIS_SH" -c 'echo ${:?}'
# then some funky ones
# note: bash prints 1 - treats it as "length of $#"? We print 0
# note: bash prints 1 - treats it as "length of $#"
"$THIS_SH" -c 'echo ${#?}'
# bash prints 0
"$THIS_SH" -c 'echo ${#:?}'