Repository navigation
v0.2.0
The first tagged release of rex-worktrunk. It covers everything since the initial 0.1.0 commit.
Added
- A
labeloption chooses the label of a new session (#2). labelandlayoutreceive a worktree table withpath,branchandmain.- Closing a worktree's session returns you to the session the worktree was opened from. If that session is gone, you go to the main checkout's session. A session is never created only to leave one.
- The session a pick was made from is adopted for the worktree it is in. It is reused on later picks and never closed, so picking the main checkout's branch no longer opens a second session.
- Closing is idempotent, so a worktrunk
post-removehook and the picker can both close the same worktree. - A test suite (
bash test/run.sh) that runs in GitHub Actions on each push tomainand each pull request.
Fixed
- The picker works in a session on a remote Rex server: a script under your home directory is started as
$HOME/<the rest of its path>on the host the float runs on (#1). - Sessions are found by worktree path, never by label, so a session is only reused or closed for the worktree it was opened for (#2).
- A failed close keeps the session on record, so you can try again.
- A label that Rex refuses falls back to the directory name. Options of the wrong type are ignored with a warning.
worktrunk.shworks from a bare repository's root and doesn't wait for a key without a terminal.
Requirements
worktrunk (wt ≥ 0.60), fzf and jq. Tested with worktrunk 0.63 and 0.81.
Install
git clone --branch v0.2.0 https://github.com/haxybaxy/rex-worktrunk ~/.config/rex/rex-worktrunkThanks to sf-jin-ku and disrupted for their contributions.