Open With not working for scripts
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
When I "open with" a shell script with Bash, I get this error message:
/bin/bash: D:\Path\To\Scripts\dostuff.sh: No such file or directory
Which is understandable, because Linux uses a different way to indicate paths.
Expected results
I'd expect it (not sure what "it" would be) to convert the supplied path to a path that is usable for bash, e.g.
D:\Path\To\Scripts\dostuff.sh -> /mnt/d/Path/To/Scripts/dostuff.sh
Steps to repro
- Make sure you've got a shell script (a
.shfile). Any will do. - Right click -> Open With -> Choose another app
- More apps -> scroll down -> Look for another app on this pc
- Type C:\Windows\system32\bash.exe (or whereever your Windows install is, you know the drill)
Now Bash will open very briefly with the above error message. Steps 2 to 4 can now be replaced with a simple doubleclick on a shell script, still resulting in the same error message.
Windows 10.0.14393 x64
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue through the reported Open With flow using C:\Windows\system32\bash.exe and a .sh file, then inspect the launcher entry point that passes the Windows path to Bash. Done means the script opens successfully with a usable WSL path such as /mnt/d/Path/To/Scripts/dostuff.sh; no repository file or test is named, so locating the implementation and coverage requires project research.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100