Skip to content

feat(shell): add cross-shell foreground key-binding widgets - #56

Merged
benbenbang merged 8 commits into
mainfrom
issue-45-zoxide
Sep 10, 2026
Merged

benbenbang merged 8 commits into
mainfrom
issue-45-zoxide

Conversation

@benbenbang

@benbenbang benbenbang commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Enable configured key bindings to safely edit command buffers while interactive tools retain foreground terminal control across supported shells.

  • Shell behavior
    • Add Bash, Zsh, PowerShell, and Nushell widgets for ordered zoxide and cj actions.
    • Append quoted paths without changing directories and preserve native terminal streams.
    • Cycle history from newest to oldest before restoring the original buffer and Unicode cursor position.
  • Runtime handling
    • Launch zoxide through snapshotted executable paths and the configured fzf alias.
    • Distinguish unavailable, empty, cancelled, fallback, and error outcomes.
    • Remove stale owned bindings during reload and initialize Nushell history once.
  • Regression coverage
    • Exercise real shell editors and PTYs for quoting, multiline paths, cursor placement, history, cancellation, errors, and dispatch ordering.
    • Gate POSIX history tests on Unix while retaining PowerShell coverage on Windows.

Refs #45
Refs #46

Add read-only helpers for Bash/Zsh and PowerShell that cycle history from newest to oldest, then restore the original command line and cursor without consuming navigation history.

Dispatcher and Nushell integration will follow.

Refs #46
Launch zoxide interactively through the configured fzf alias using snapshotted executable paths. Add a private CLI protocol that distinguishes unavailable, empty, and cancelled outcomes without re-reading TOML.

Refs #45
Add ordered zoxide and cj behaviors that append quoted paths without changing directories. Distinguish cancellation, errors, and fallback while preserving native PowerShell streams.

Support Bash 4+ cursor versions and remove owned stale bindings during reload.

Refs #45
Refs #46
Exercise real zoxide interaction and snapshot custom programs and options.
Cover quoting, empty or missing fallbacks, cancellation, and errors.

Refs #45
Add real Bash Readline and Zsh ZLE tests for Unicode cursor placement,
literal insertion, and buffer preservation on cancellation and errors.
Ensure directory and history state remain untouched.

Cover PowerShell dispatch ordering and owned-binding reload behavior.

Refs #45
Refs #46
Add Nushell Reedline command-buffer widgets and initialize history once through the exported widget environment. Preserve terminal streams and add native PowerShell PSReadLine regression coverage.

Refs #45
Refs #46
Verify foreground terminal ownership, literal multiline paths, history cycling, and restoration of the original Unicode cursor position. Cover cancellation and error preservation, including fallback behavior.

Refs #45
Refs #46
@benbenbang
benbenbang enabled auto-merge (rebase) September 9, 2026 23:31
@github-actions github-actions Bot added the enhancement New feature or request label Sep 9, 2026
@benbenbang
benbenbang disabled auto-merge September 9, 2026 23:33
Avoid invoking the Windows bash.exe WSL stub when no Linux distribution is installed. Keep PowerShell tests enabled on Windows with no production behavior changes.

Refs #45
@benbenbang
benbenbang merged commit ede350c into main Sep 10, 2026
7 of 10 checks passed
@benbenbang
benbenbang deleted the issue-45-zoxide branch September 10, 2026 00:18
@ptah-bw-technical-app

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.4.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

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant