diff options
author | Mike Frysinger | 2009-06-01 14:09:09 -0400 |
---|---|---|
committer | Mike Frysinger | 2009-06-01 16:01:28 -0400 |
commit | b6bca7703bbe6aacec0bda964c82fad389a02b69 (patch) | |
tree | 59696310ddbfbc919c99aca7704243d5a55773d8 /shell/hush.c | |
parent | 77508d70bfa9c50477479af176ff41e9443d4f67 (diff) | |
download | busybox-b6bca7703bbe6aacec0bda964c82fad389a02b69.zip busybox-b6bca7703bbe6aacec0bda964c82fad389a02b69.tar.gz |
hush: add support for special vars in braces
Some people like to use ${?} rather than $?, so make sure we support all
the special single char vars that use this form.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index 735cb4c..d067e91 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -5272,6 +5272,9 @@ static int handle_dollar(o_string *as_string, all_digits = true; goto char_ok; } + /* They're being verbose and doing ${?} */ + if (i_peek(input) == '}' && strchr("$!?#*@_", ch)) + goto char_ok; } if (expansion < 2 |