633ceb6db5
set -- ""; echo ${1:-wwww} works. - when expanding arithmetic, discard previous ifs recorded regions, since we are doing our own scanning. x=ab; echo $((${#x}+1)) now works. - in ${var#word} fix two bugs: * if there was an exact match, there was an off-by-one bug in the comparison of the words. x=abcd; echo ${x#abcd} * if there was no match, the stack region was not adjusted and the rest of the word was getting written in the wrong place. x=123; echo ${x#abc}X