diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-06-01 14:09:09 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-01 14:16:43 -0400 |
commit | dc3bc40578e0d9a4f4437d5b9018c1dd02900584 (patch) | |
tree | f6ac1edd6f84a81fdda2a84ac29d06a0181904d0 /shell/hush.c | |
parent | ff64fb9e3100ff89446b54af3ef80cd86d4730f5 (diff) | |
download | busybox-w32-dc3bc40578e0d9a4f4437d5b9018c1dd02900584.tar.gz busybox-w32-dc3bc40578e0d9a4f4437d5b9018c1dd02900584.tar.bz2 busybox-w32-dc3bc40578e0d9a4f4437d5b9018c1dd02900584.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 7d0416796..b5cf86132 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -5303,6 +5303,9 @@ static int handle_dollar(o_string *as_string, | |||
5303 | all_digits = true; | 5303 | all_digits = true; |
5304 | goto char_ok; | 5304 | goto char_ok; |
5305 | } | 5305 | } |
5306 | /* They're being verbose and doing ${?} */ | ||
5307 | if (i_peek(input) == '}' && strchr("$!?#*@_", ch)) | ||
5308 | goto char_ok; | ||
5306 | } | 5309 | } |
5307 | 5310 | ||
5308 | if (expansion < 2 | 5311 | if (expansion < 2 |