hush: fix escaping of \[*?; add testsuites for these and for globbing
diff --git a/shell/hush.c b/shell/hush.c
index 82bad66..e57f6e3 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -3638,7 +3638,6 @@
debug_printf_parse("parse_stream return 1: \\<eof>\n");
return 1;
}
- o_addqchr(dest, '\\', dest->o_quote);
o_addqchr(dest, i_getch(input), dest->o_quote);
break;
case '$':
@@ -3653,7 +3652,7 @@
ch = i_getch(input);
if (ch == EOF || ch == '\'')
break;
- o_addchr(dest, ch);
+ o_addqchr(dest, ch, 1);
}
if (ch == EOF) {
syntax("unterminated '");