$ | >

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.

62 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Ezinwa Okpoechi shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Chris Hacking commented  ·   ·  Flag as inappropriate

        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.

      Feedback and Knowledge Base