summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2020-12-27 16:04:54 +0100
committerDenys Vlasenko2020-12-27 16:04:54 +0100
commitc7ef8187688b0e7f92d19b3fed2c4ecffe39a688 (patch)
tree56fa071390a864c58550390e213a1a8bb7355397
parent1462673dde780091664dbbc79e1c01811bd48e40 (diff)
downloadbusybox-c7ef8187688b0e7f92d19b3fed2c4ecffe39a688.zip
busybox-c7ef8187688b0e7f92d19b3fed2c4ecffe39a688.tar.gz
hush: make comment more clear
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/hush.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c
index f9a295e..f5cbbc3 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -6694,12 +6694,13 @@ static NOINLINE int expand_one_var(o_string *output, int n,
*
* Word-splitting and single quote behavior:
*
- * $ f() { for i; do echo "|$i|"; done; };
+ * $ f() { for i; do echo "|$i|"; done; }
*
- * $ x=; f ${x:?'x y' z}
- * bash: x: x y z #BUG: does not abort, ${} results in empty expansion
+ * $ x=; f ${x:?'x y' z}; echo $?
+ * bash: x: x y z # neither f nor "echo $?" executes
+ * (if interactive, bash does not exit, but merely aborts to prompt. $? is set to 1)
* $ x=; f "${x:?'x y' z}"
- * bash: x: x y z # dash prints: dash: x: 'x y' z #BUG: does not abort, ${} results in ""
+ * bash: x: x y z # dash prints: dash: x: 'x y' z
*
* $ x=; f ${x:='x y' z}
* |x|