← Commit list

c7ef81876

Denys Vlasenko
Denys Vlasenko
2020-12-27
SUCCESS Duration: 151s

Subject

hush: make comment more clear

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/hush.c+5 -4
@@ -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|