Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open worktree in a new tab and retain the working directory of the old tab #95

Open
bigjazzsound opened this issue Sep 1, 2022 · 0 comments

Comments

@bigjazzsound
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant