diff options
-rw-r--r-- | shell/hush.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c index f9a295e8d..f5cbbc39f 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -6694,12 +6694,13 @@ static NOINLINE int expand_one_var(o_string *output, int n, | |||
6694 | * | 6694 | * |
6695 | * Word-splitting and single quote behavior: | 6695 | * Word-splitting and single quote behavior: |
6696 | * | 6696 | * |
6697 | * $ f() { for i; do echo "|$i|"; done; }; | 6697 | * $ f() { for i; do echo "|$i|"; done; } |
6698 | * | 6698 | * |
6699 | * $ x=; f ${x:?'x y' z} | 6699 | * $ x=; f ${x:?'x y' z}; echo $? |
6700 | * bash: x: x y z #BUG: does not abort, ${} results in empty expansion | 6700 | * bash: x: x y z # neither f nor "echo $?" executes |
6701 | * (if interactive, bash does not exit, but merely aborts to prompt. $? is set to 1) | ||
6701 | * $ x=; f "${x:?'x y' z}" | 6702 | * $ x=; f "${x:?'x y' z}" |
6702 | * bash: x: x y z # dash prints: dash: x: 'x y' z #BUG: does not abort, ${} results in "" | 6703 | * bash: x: x y z # dash prints: dash: x: 'x y' z |
6703 | * | 6704 | * |
6704 | * $ x=; f ${x:='x y' z} | 6705 | * $ x=; f ${x:='x y' z} |
6705 | * |x| | 6706 | * |x| |