diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-06-01 14:09:09 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-01 16:01:28 -0400 |
commit | b6bca7703bbe6aacec0bda964c82fad389a02b69 (patch) | |
tree | 59696310ddbfbc919c99aca7704243d5a55773d8 /shell/hush.c | |
parent | 77508d70bfa9c50477479af176ff41e9443d4f67 (diff) | |
download | busybox-w32-b6bca7703bbe6aacec0bda964c82fad389a02b69.tar.gz busybox-w32-b6bca7703bbe6aacec0bda964c82fad389a02b69.tar.bz2 busybox-w32-b6bca7703bbe6aacec0bda964c82fad389a02b69.zip |
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 735cb4cee..d067e919d 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -5272,6 +5272,9 @@ static int handle_dollar(o_string *as_string, | |||
5272 | all_digits = true; | 5272 | all_digits = true; |
5273 | goto char_ok; | 5273 | goto char_ok; |
5274 | } | 5274 | } |
5275 | /* They're being verbose and doing ${?} */ | ||
5276 | if (i_peek(input) == '}' && strchr("$!?#*@_", ch)) | ||
5277 | goto char_ok; | ||
5275 | } | 5278 | } |
5276 | 5279 | ||
5277 | if (expansion < 2 | 5280 | if (expansion < 2 |