Skip to content

Merge develop into main for v0.1.19 release#14

Merged
ShortArrow merged 2 commits into
mainfrom
develop
Jun 1, 2026
Merged

Merge develop into main for v0.1.19 release#14
ShortArrow merged 2 commits into
mainfrom
develop

Conversation

@ShortArrow

Copy link
Copy Markdown
Owner

Summary

Release 0.1.19 ships the Issue #9 closeout of the 0.1.17 Git Bash bake-path trade-off.

Tests

Test plan

Closes #9.

…th (closes #9)

0.1.17 carved out command-position detection from the Git Bash bake-
mode dispatcher so the Ctrl+C fix (#7) could ship as a focused
release. As a result, on Git Bash any trailing token matching an
abbreviation expanded regardless of context — `echo gst<Space>`
expanded `gst` even though the user clearly wanted it as an
argument to `echo`. The Linux / WSL exec path has always honoured
`is_command_position`, so the trade-off was Git-Bash-only.

Fix: bake dispatcher reproduces `domain::hook::is_command_position`
in pure bash via `__runex_cyg_is_command_position`: a `case` over
the four pipeline operators (`&&`, `||`, `|`, `;`) plus a
trailing-`sudo` recursion that defers to the same operator check.
The bake path produces the byte-equivalent buffer rewrite as the
exec path for every input.

Same PR also switches the `__runex_cyg_expand` prefix computation
from `${left%$token}` to a substring slice. The old form treated
the token as a `%` glob pattern, so a token containing `?` / `*` /
`[` would strip an unintended portion of the left side. The new
substring form is byte-faithful regardless of token contents.

Tests:
- 5 new unit tests in bash_static_dispatcher::tests pin the
  generated helper structure.
- 5 new Linux PTY tests in bash_cygwin_bake_pty.rs for argument
  position (no expand) and each command-position prefix.
- 4 new Windows-local smokes drive __runex_expand directly on
  every cygwin-family bash installed.
- 1 new exec-path PTY test mirrors the bake-path counterpart so
  parity is visible in one diff.
- Manual verify on Git Bash 0.1.19: echo gst<Space> no longer
  expands; sudo gst<Space> still does; gst<Space> still does;
  Ctrl+C after expansion still clean (#7 regression check).

Docs:
- docs/setup.{md,ja.md} troubleshooting item 7 (Git Bash 0.1.17
  interim trade-off) removed.
- Module docstring swaps trade-off section for parity note.

Bump 0.1.18 → 0.1.19 + Cargo.lock + CHANGELOG.

Closes #9.
@ShortArrow
ShortArrow merged commit db11ed9 into main Jun 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore command-position detection on the Git Bash bake path (0.1.19)

1 participant