Run WSL binaries in Windows without 'bash.exe -c'
It would be nice for Windows to be able to run binaries in WSL without needing to prefix 'bash.exe -c'. The main reason for this would be editor integration. For example, VS Code language extensions require the binary for the language to be in your PATH and often do not work without it. It seems like a waste to install the language in both Windows and WSL just to get editor integration.
Obviously, executables from Windows will still have a higher priority. Only when the executable cannot be found in the Windows PATH should it now attempt to run the binary from WSL.
Jari Pennanen commented
Reason this would be amazing is that it could potentially allow to run Haskell and other developer tools 'natively', e.g. if VSCode extension expects to find Haskell Ide Engine "hie.exe" it could just use the ELF binary instead.
Haskell tooling has no Windows support (except in rare cases), so building and running them inside WSL is pretty much required.
Sky Schulz commented
Second Chris Hacking's comment: PATH order should determines priority.
I made a simple batch script and bash wrapper that enables you to call aliases to linux binaries from windows. Check it out on github: https://github.com/leongrdic/wsl-alias
Chris Hacking commented
This can be scripted, such that the "binary" is actually a script that invokes bash -c (or whatever other Linux subsystem you want to use). Inconvenient, though, so I support letting us invoke them directly. However, I disagree with the "Windows should have higher priority"; priority should be determined 100% by the PATH environment variable, just as it is on Windows without WSL and within WSL when your path holds both Linux and Windows binaries.