Skip to content

fix(shell): handle whitespace and home paths in worktree completion - #59

Merged
benbenbang merged 3 commits into
mainfrom
issue-58-worktree-space
Sep 10, 2026
Merged

benbenbang merged 3 commits into
mainfrom
issue-58-worktree-space

Conversation

@benbenbang

Copy link
Copy Markdown
Member

Worktree completion produced incorrect results after trailing whitespace and displayed verbose Zsh labels for paths under HOME.

  • Support completion after spaces or tabs across POSIX shells, Nushell, and PowerShell while preserving literal paths, history safety, and attached triggers.
  • Display Zsh worktree paths under HOME as ~/… without changing inserted paths or fzf-tab previews.
  • Document the behavior and add cross-shell and real-terminal regression coverage.

Closes #58

Support Tab after `cd -jw` and `--jump-worktree` with spaces or tabs across shells while preserving attached triggers.

Preserve literal selected paths and history recording, quote Nushell suggestions, and extend PowerShell replacement ranges. Document the behavior and add POSIX real-terminal regressions isolated from the Git hook environment.

Further cross-shell regression tests will follow separately due to commit size limits.

Refs #58
Cover Nushell and PowerShell trailing-whitespace completion, literal quoting,
and invalid-argument and history safety for worktree commands.

Exercise real Nushell Reedline Tab insertion plus Enter and back navigation in
an isolated PTY.

Validation: 127 local tests and Windows-target Clippy passed. Native Windows
runtime coverage remains for CI after push.

Closes #58
Use `compadd -d` to display paths under `HOME` as `~/…` while preserving absolute insertion and fzf-tab preview paths.

Cover exact `HOME`, trailing slashes, empty values, directory prefix boundaries, and actual ZLE absolute insertion. Independently verify installed fzf-tab capture, query, and apply behavior.

Refs #58
@benbenbang
benbenbang enabled auto-merge (rebase) September 10, 2026 08:19
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 10, 2026
@benbenbang
benbenbang merged commit 3ea0cf2 into main Sep 10, 2026
5 checks passed
@benbenbang
benbenbang deleted the issue-58-worktree-space branch September 10, 2026 08:22
@ptah-bw-technical-app

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(shell): support worktree Tab completion after trailing whitespace

1 participant