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
${var@P}: \# command-number escape expands to 0 in scripts (GNU counts executed commands); set -o column width off by one #393
Found during wt33 triage of #374. Two small formatting/param divergences, both GNU-verified via script-file probes under target/issue-suites/results/wt33-373/run/.
1. ${var@P} \# escape
H09_typeset_int_compound.sh tail:
p='history=\! command=\#'
echo "${p@P}"
GNU 5.3.0: history=1 command=7 (the 7 counts commands executed so far in the script)
rubash: history=1 command=0
(\! already matches: 1 on both.)
2. set -o readable column width
H07_set_o_spacing.sh: set -o | grep -E '^(pipefail|emacs)' | cat -A
GNU 5.3.0: emacs ^Ioff$ / pipefail ^Ioff$ (name padded to a 16-char column)
rubash: one extra space of padding (17-char column)
Tests left tracking: part_066 test_parameter_prompt_transform_expands_history_and_command_count_escapes (#[ignore] -> this issue; its old expectation history=0 was wrong for GNU too), part_022 test_shopt_o_uses_readable_format_without_print_flag (#[ignore] -> this issue).
Activity
prompt(#393): ${var@P} \# reads a real current_command_number; shopt …
caomengxuan666 commentedon Oct 2, 2026
Landed as 7877a7c: ${var@P}
\#reads a real current_command_number (GNU builtins/... @p transform), shopt -o column width corrected. 6/6 regression suite; 11/12 two-shell probes byte-identical (residual = WinuxCmd cat -A environment item).