hangxingliu / wslgit

:candy: Use Git installed in WSL(Windows Subsystem for Linux) from Windows and Visual Studio Code
GNU General Public License v3.0
150 stars 18 forks source link

Use a cmd instead of a bat extension #5

Open calexandre opened 5 years ago

calexandre commented 5 years ago

Hello, Great project! Finally was able to get rid of git for windows :)

As a suggestion, would you see any impediment in using a cmd instead of a bat extension? The reason is that with a bat extension one must allways write git.bat to invoke git commands. With a cmd extension, you can add it to path, and use the typical git command to invoke the cli...

hangxingliu commented 5 years ago

Thanks for your suggestion. I will test it on my Windows device later and update the extension name.

hangxingliu commented 5 years ago

@calexandre I tried to modify the ext name to .cmd and it is works fine as you said.

But I found it is still working fine if keeping its ext name as .bat. And I found the following Q&A on the StackOverflow after I searched on the Google:

https://superuser.com/questions/1027078/what-is-the-default-value-of-the-pathext-environment-variable-for-windows

So It seems that these two ext names are the same effect in here.

harryqt commented 4 years ago

The reason is that with a bat extension one must allways write git.bat to invoke git commands. With a cmd extension, you can add it to path, and use the typical git command to invoke the cli...

Both ext can be called without their extension. They are almost same.