~/.config/fish/config.fish
function isWinDir
switch $PWD/
case '/mnt/*'
return 0
case '*'
return 1
end
end
function git
if isWinDir
git.exe $argv
else
/usr/bin/git $argv
end
end
From https://github.com/microsoft/WSL/issues/4401#issuecomment-670080585