Replies: 1 comment
-
You can write any bash script in os:
openCommand: open "$(git rev-parse --show-toplevel)/"{{filename}} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to pass the full file path or the repo directory when using
openCommand
?My use case is the following:
In neovim 0.7 you can do the following:
In lazygit config I can add the following:
This will open the file in the neovim instance listening on the socket, ready for editing when you press
o
.This works great but I would like to be able to run a nvim instance per repo rather than a global instance where I send all files. In order to achieve this I would to use a small wrapper script but I need to work out how to get lazygit to send the full file path or the repo directory path. The templated
filename
variable is relative to the repo, therefore I cant tell what repo the file resides in in my wrapper script.This is what I am after:
or
and my wrapper would look like this:
The repo dir would be preferable as if I just get the filepath I need to mess with basename/dirname and git rev-parse --show-toplevel
I looked at the wiki and most of the docs and could not work out how to do it. Is this possible? If not would the developers consider adding this template var?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions