git-worktree.nvim icon indicating copy to clipboard operation
git-worktree.nvim copied to clipboard

Add additional "pre" hooks

Open halfdan opened this issue 3 years ago • 1 comments

I'm using the hooks to handle docker-composing up / down containers as I create or switch between worktrees. The only issue I have is that there's no pre-delete hook that would allow me to run docker-compose down. I imagine this would be useful for other things as well to clean up resources when a worktree is removed.

My proposal would be to add an additional Deleting hook that receives the path of the to be deleted worktree.

halfdan avatar Oct 19 '22 10:10 halfdan

i also feel the need for this pre hooks. i'm using tpope's obsession plugin and don't want it to track when switching worktree. i've tinker a bit and gonna make pr. please give feedback, thanks.

ngntrpy avatar Oct 31 '23 10:10 ngntrpy