wslgit | Use Git installed in WSL | Code Editor library
kandi X-RAY | wslgit Summary
kandi X-RAY | wslgit Summary
Use Git installed in WSL(windows Subsystem for Linux) from Windows and Visual Studio Code. The project was inspired by A. R. S.'s project andy-5/wslgit written by Rust. But why do I re-implement it by scripts, because I hope the wslgit tools could support any mount points (but not only under the /mnt/) and could be used without compiling.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wslgit
wslgit Key Features
wslgit Examples and Code Snippets
Community Discussions
Trending Discussions on wslgit
QUESTION
I'm having problems passing properly in bash parameter values that include spaces and/or newlines from wsl to a program on the win10 host.
Well. it's a generic question, but it comes out of a concrete use-case.
The concrete use-case is using the host-level git binary, namely git.exe
from within the wsl.
I know there are rather popular solutions like wslgit, that lets you call from windows the git binary in the wsl. However, this does not only implies that your wsl would lunch for every git command if it was not already running, but it incurs a gotcha-full setup and a questionably optimizable performance footprint.
My wsl is not always on - many of my tasks do not require it, and I don't want to keep it running for git - so my options are the opposite: use from the wsl the git.exe
, which is always present.
Anyway, I believe this represents a more generic case and can be relevant to any host-level program called from wsl.
So, in the concrete example of git
- I needed a shim that will pass the call to the git.exe
whenever the git
command is called from within any of the shells of the WSL.
This can be done by replacing /usr/bin/git
with a shim that will wire the call to git.exe
.
So. The 1st naive implementation was:
...ANSWER
Answered 2021-Oct-11 at 06:40That's the answer:
first, just for backup:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wslgit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page