Last active
January 22, 2024 07:18
-
-
Save anhkind/4f19428ab1dc00c98ff67f1a7c45cdda to your computer and use it in GitHub Desktop.
Revisions
-
anhkind revised this gist
Jan 22, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # from: https://github.com/microsoft/WSL/issues/4401#issuecomment-670080585 # checks to see if we are in a windows or linux dir function isWinDir { case $PWD/ in -
anhkind created this gist
Jan 22, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # checks to see if we are in a windows or linux dir function isWinDir { case $PWD/ in /mnt/*) return $(true);; *) return $(false);; esac } # wrap the git command to either run windows git or linux function git { if isWinDir then git.exe "$@" else /usr/bin/git "$@" fi }