andy-5 / wslgit

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
MIT License
1.19k stars 59 forks source link

[Feature question] Devenv/Direnv compatibility #137

Closed sneakyvv closed 1 year ago

sneakyvv commented 1 year ago

Hi @andy-5,

I was wondering if it would be hard to add support for devenv / direnv.

I'm trying to figure out how I can make wslgit execute the git commands inside the devenv shell. All that has to be done is making wslgit (in Fork, or wherever) commands run devenv shell git ... instead of git ..., assuming git commands already run in the git working directory. Otherwise it can be direnv exec <DIR> git ....

I'm guessing that before https://github.com/andy-5/wslgit/blob/master/src/main.rs#L388, something like cmd_args.push("devenv shell".to_string()); needs to be added, but I'm wondering how the exe's are being built.

Can you help me with this? 🙏

sneakyvv commented 1 year ago

Never mind, I found a solution that doesn't require this.