hush: fix quoted "${notexist-}" expansion to not disappear

function                                             old     new   delta
expand_one_var                                      2296    2311     +15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2019-05-15 13:39:19 +02:00
parent 8402969d48
commit 9e0adb9b09
5 changed files with 20 additions and 0 deletions

View File

@ -5,3 +5,5 @@ _aaaa _aaaa _aaaa _aaaa _aaaa
_ _ _ _word _word
_ _ _ _ _word
_fff _fff _fff _fff _fff
1:1
0:0

View File

@ -21,3 +21,8 @@ echo _$f _${f-} _${f:-} _${f-word} _${f:-word}
f=fff
echo _$f _${f-} _${f:-} _${f-word} _${f:-word}
set --
set -- "${1-}"; echo 1:$#
set --
set -- ${1-}; echo 0:$#