Skip to content

eritpchy/wslscript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shell script (.sh) handler for Windows Subsystem for Linux (WSL).

Associates .sh (or any other) extension to be executed in WSL. Automatically handles Windows → Unix path conversions. Files can be dragged and dropped to registered file icon in explorer to pass paths as arguments.

Usage

Copy wslscript.exe file to a location of your choice. This executable is used to invoke WSL, so don't move the file afterwards.

Run wslscript.exe to open a setup GUI. Enter the extension and click Register button to add filetype association into Windows registry.

After registration, .sh files can be executed from explorer by double clicking. Other files can be passed as path arguments by dragging and dropping them into .sh file icon.

Scripts are executed in the same folder where the script file is located, ie. $PWD is set to script's directory.

Note that Drag & Drop handler may not work until reboot.

TODO

  • Optionally register for all users

License

This project is licensed under the MIT License.

Icon by Tango Desktop Project.

About

Associate .sh script files with WSL.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 98.5%
  • HTML 1.3%
  • SCSS 0.2%