Skip to content

feat(shell)!: require Tab for cd worktree selection - #52

Merged
benbenbang merged 1 commit into
mainfrom
fix/worktree-tab-only
Sep 9, 2026
Merged

benbenbang merged 1 commit into
mainfrom
fix/worktree-tab-only

Conversation

@benbenbang

Copy link
Copy Markdown
Member

cd -jw and cd --jump-worktree now require Tab to select a worktree. Pressing Enter while the token is unresolved prints a reminder, fails, and leaves the directory unchanged instead of launching fzf. After Tab inserts a path, Enter executes the ordinary cd command.

This applies to Bash, Zsh, Nushell, and PowerShell. Standalone cj -jw and its optional worktree key binding are retained. The Tab fix is supplied by the base PR #50.

Updated documentation and wrapper regressions verify the hint, failure status, unchanged working directory, and absence of fzf calls. Full local tests and clippy pass, including the real ZLE Tab test; Nushell rejection was also exercised directly.

Closes #51

BREAKING CHANGE: direct execution of cd -jw / cd --jump-worktree no longer launches the picker; press Tab to select a destination first.

Base automatically changed from fix/zsh-jump-token to main September 9, 2026 03:02
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 9, 2026
Remove the direct Enter-triggered picker from generated shell wrappers. Preserve native Tab completion and the standalone cj picker and key bindings.

Reject unresolved jump tokens with a visible hint while leaving the current directory unchanged and avoiding fzf invocation. Extend integration coverage for wrapper failures and real ZLE Tab completion.

BREAKING CHANGE: Unresolved `cd -jw` and `cd --jump-worktree` tokens now require Tab completion before pressing Enter.

Closes #51
@benbenbang
benbenbang force-pushed the fix/worktree-tab-only branch from 7f28d71 to b94e625 Compare September 9, 2026 03:04
@benbenbang
benbenbang enabled auto-merge (squash) September 9, 2026 03:05
@benbenbang
benbenbang disabled auto-merge September 9, 2026 03:06
@benbenbang
benbenbang merged commit 2c3bdea into main Sep 9, 2026
5 checks passed
@benbenbang
benbenbang deleted the fix/worktree-tab-only branch September 9, 2026 03:06
ptah-bw-technical-app Bot added a commit that referenced this pull request Sep 10, 2026
## [0.4.0](0.3.0...0.4.0) (2026-09-10)

### ⚠ BREAKING CHANGES

* **init:** `cj init` now installs configured directory bindings by default.
* **shell:** add bounded shell-local directory history
* **shell:** Unresolved `cd -jw` and `cd --jump-worktree` tokens now require Tab completion before pressing Enter.

### 🎁 Features

* **config:** add ordered per-OS key binding behaviors ([#53](#53)) ([b9495e0](b9495e0)), closes [#44](#44)
* **init:** install configured directory bindings by default ([5bc390d](5bc390d)), closes [#47](#47) [#44](#44) [#45](#45) [#46](#46)
* **shell:** add bounded shell-local directory history ([f49d2f5](f49d2f5)), closes [#36](#36)
* **shell:** add browser-history command-buffer completion helpers ([6c452bb](6c452bb)), closes [#46](#46)
* **shell:** add fzf-on-Tab worktree completion for cd wrappers ([258cf99](258cf99)), closes [#40](#40)
* **shell:** add runtime zoxide interactive launcher ([d17e39c](d17e39c)), closes [#45](#45)
* **shell:** complete foreground shell support ([6358163](6358163)), closes [#45](#45) [#46](#46)
* **shell:** implement foreground configured key-binding widgets ([ddf5240](ddf5240)), closes [#45](#45) [#46](#46)
* **shell:** require Tab for cd worktree selection ([#52](#52)) ([2c3bdea](2c3bdea)), closes [#51](#51)

### ♨️ CI, Workflows & Configs

* **consilium:** configure squash merges and URL hints ([#48](#48)) ([5367989](5367989))
* **csl:** add configuration file ([#42](#42)) ([edecc89](edecc89))

### 🪲 Bug Fixes

* **completion:** replace Tab picker with native worktree completion ([db2074b](db2074b)), closes [#40](#40)
* **powershell:** intercept cd jump tokens in TabExpansion2 ([5a95843](5a95843)), closes [#40](#40)
* **shell:** register Bash key bindings only interactively ([048e4ae](048e4ae)), closes [#47](#47)
* **src:** register native PowerShell completion for cd ([c5f6b2e](c5f6b2e)), closes [#40](#40)
* **zsh:** replace exact jump tokens with worktree completions ([fe2e263](fe2e263)), closes [#49](#49)
@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

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.

feat(shell): use Tab for cd worktree selection

1 participant