Repository navigation
v0.4.0
Worktrees can now open as tabs in one session per repository, in place of a session per worktree (#7, #8).
Added
- With
group = "tab", each repository has one session, and each of its worktrees is a tab in it.group = "session"stays the default.- Tabs open in the session your main checkout is in, if you have picked from it there. Otherwise the plugin creates a session named after the main checkout's directory.
- A tab is labelled with its branch. The
labelandlayoutoptions apply to the tab. - Removing a worktree closes its tab and returns you to the tab you came from, or else the main checkout's tab. The session stays open. A session the plugin created is closed with its last tab.
- Changing
grouponly affects worktrees opened afterwards. A worktree that already has a session or tab keeps it until it is removed.
worktree_goandworktree_closealso returnwindow_id, andworktree_closereturnsmoved_to_window.
Changed
- Two messages of
worktrunk.shnow say "session or tab". - With the default
group = "session", the plugin makes the same calls to Rex as 0.3.0.
Upgrade notes
- The registry file (
~/.local/state/rex-worktrunk/sessions) keeps its format for worktrees that have a session of their own, and gains fields for tabs. 0.3.0 and earlier don't know those fields and would treat a worktree's tab as a whole session. Before going back to an older version, remove the worktrees you opened as tabs, or delete the file.
Requirements
- worktrunk (
wt≥ 0.60) and jq. - fzf, for the float picker.
- For the native picker: a Rex whose server and app can show palette prompts (server API revision 17 or later).
group = "tab"was tested with Rex server API revision 19.
Install
git clone --branch v0.4.0 https://github.com/haxybaxy/rex-worktrunk ~/.config/rex/rex-worktrunk