You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
argument-less -O/+O errors (rc 2) where GNU lists the shopt table (rc 0) — sibling of the fixed -o case #780
Argument-less -o was fixed in #778 (now prints the option table, rc 0, matching GNU). Its sibling was left unreported and is still divergent:
$ rubash +O # and: rubash -O
# rubash: rc 2 (invalid option / missing argument)
# GNU 5.3.0: prints the shopt table (set +o behaviour), rc 0
GNU bash's parse_shell_options (shell.c, the -O/+O arm) routes an argument-less -O/+O to the shopt listing exactly as -o/+o route to list_minus_o_opts. Verified against GNU bash 5.3.0 (file-based invocation); found during the #705 sweep and left untouched there for minimality.
Shape note
The engine route and the ShellInvocation route both error today, so the fix belongs beside the -o handling added in #778 (ShellInvocation records the request; the option-application step emits the table).
Activity
fix: heredoc delimiter quote removal, shopt -O listing, marker-leak p…
caomengxuan666 commentedon Oct 17, 2026
修了,提交
3f2275a。按 #778 的
-o/+o同路处理:ShellInvocation加list_shopt_options: Option<bool>,-O(false)走name<TAB>on|off,+O(true)走shopt -u|-s name。Executor::print_shopt_options_listing/ShellInvocation::write_shopt_options_listing,字节直接来自shopt/shopt -p的内建表,不另写一份格式。run_args(src/main.rs)和parse_post_c_option。-O <name>/+O <name>的行为不变。验证:
-O输出与rubash -c shopt逐字节相同,+O与rubash -c 'shopt -p'相同,rc 0。回归测试argument_less_capital_o_prints_the_shopt_listing就用这个不变量断言,不依赖 GNU 在场。