wslgit icon indicating copy to clipboard operation
wslgit copied to clipboard

Use a cmd instead of a bat extension

Open calexandre opened this issue 6 years ago • 3 comments

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...

calexandre avatar Feb 13 '19 13:02 calexandre

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

hangxingliu avatar Feb 13 '19 14:02 hangxingliu

@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.

hangxingliu avatar Feb 21 '19 21:02 hangxingliu

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.

harryqt avatar Mar 12 '20 06:03 harryqt