From 30fc9bf427ae9bd593dcb578b04ad1a7f663aa73 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 25 Feb 2026 18:33:02 +0000 Subject: [PATCH] Link root repos .enter and .exit in new worktrees --- worktree/worktree.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/worktree/worktree.plugin.zsh b/worktree/worktree.plugin.zsh index caf24af..bc8701f 100644 --- a/worktree/worktree.plugin.zsh +++ b/worktree/worktree.plugin.zsh @@ -34,6 +34,12 @@ Manage git worktrees by branch name." local root=$(git rev-parse --show-toplevel) local wt_dest=${root:h}/${root:t}@${branch} git worktree add "$wt_dest" "$branch" + if [ -f $root/.enter ] && [ -f $root/.exit ]; then + ln -s $root/.enter $wt_dest/.enter + ln -s $root/.exit $wt_dest/.exit + _autoenv_authorized $PWD/.enter yes + _autoenv_authorized $PWD/.exit yes + fi ;; rm|remove) local wt_path