Closed
Labels
P3-low低:优化、文档、远期规划,有机会再做area:cmdlineinvocation surface: flags, -c/-s/script mode, --encoded-command, --cwd-statebugSomething isn't workinggnu-baselineTracked by the GNU Bash 5.3.0 true-baseline ledger
Description
[bug] niu --pretty-print -c pretty-prints instead of executing (documented flag misbehaves)
bash --pretty-print -c 'echo hi' # prints hi, rc 0
niu --pretty-print -c 'echo hi' # prints `echo hi`, never executes, rc 0
bash --pretty-print -c 'exit 3' # no output, rc 3
niu --pretty-print -c 'exit 3' # prints `exit 3`, rc 0File-arg form is clean (both print the formatted script, rc 0) and stdin form too (both print, don't execute) — only the -c combo silently swallows execution with rc 0. Low (obscure flag), but a silent no-exec + rc 0 can confuse scripts probing it.
Env: niubash 1.4.4 / rubash engine (master ~2026-10), GNU bash 5.3.20 aarch64-linux-android as oracle.
Metadata
Metadata
Assignees
Labels
P3-low低:优化、文档、远期规划,有机会再做area:cmdlineinvocation surface: flags, -c/-s/script mode, --encoded-command, --cwd-statebugSomething isn't workinggnu-baselineTracked by the GNU Bash 5.3.0 true-baseline ledger
Activity
caomengxuan666 commentedon Oct 23, 2026
Fixed by #1181 (2026-10-22/23 bulk GNU-parity wave): landed as a dedicated commit referencing this issue, covered by the audit differential suite (tests/fixtures/audit/), and re-verified byte-for-byte against a GNU bash 5.3.20 oracle; master CI (ff1a555) runs the suite green.
Closing now to restore the linkage: GitHub's closing-reference parser only honored the first entry of #1181's long
Fixeslist, so this stayed open after the fix landed. If anything still reproduces on current master, reopen with a transcript and it returns to the fix queue.caomengxuan666 commentedon Oct 23, 2026
Re-verified still broken on niu 1.4.4 / rubash 1b14a3d vs GNU bash 5.3.20 (#1181 did not cover this case):
caomengxuan666 commentedon Oct 23, 2026
Verified fixed on current master (1b14a3d+ / debug build from origin/master): GNU-identical output confirmed by differential repro (see triage). Closing.