git-worktree.nvim
git-worktree.nvim copied to clipboard
Open worktree in a new tab and retain the working directory of the old tab
My current config:
require("git-worktree").setup {
change_directory_command = "tcd",
update_on_change_command = "tabnew",
}
If I create a new worktree, it opens it in a new tab and correctly sets the working directory to the path of the new worktree. However the previous tab where I ran the command also changes its directory to the new worktree.
I would like the previous tab to maintain the working directory rather than switch to the new worktree. I attempted to use a hook to set the working directory in the new tab only, but was unsuccessful.