Skip to content

Utility for calling a Linux command on the WSL Bash by translating Windows paths into Linux paths (e.g. "C:\users\..." to "/mnt/c/users/...").

Notifications You must be signed in to change notification settings

JohnSkandar/bashex

Repository files navigation

Introduction

Bash Extended call utility for Windows Linux Subsystem (WSL). Calls a Linux command on the WSL Bash by translating Windows paths into Linux paths.

Getting Started

Usage: bashex.exe linux_command arguments

  • arguments with spaces must be put between " "
  • files in the working directory must be referred with .\

Outcome: calls bash.exe -c "linux_command arguments", where arguments that are paths are translated to Linux paths and put between ' '. Arguments that are not paths are left unchanged. Works also from 32-bit shell, as it calls C:\Windows\sysnative\bash.exe.

Examples

bashex.exe vi "E:\My documents\my file.txt" translates to: bash -c "vi '/mnt/e/My documents/my file.txt'"

Building

The solution was created with Visual Studio 2017. When opening in previous versions, it can be necessary to retarget the solution to the Windows SDK version installed.

About

Utility for calling a Linux command on the WSL Bash by translating Windows paths into Linux paths (e.g. "C:\users\..." to "/mnt/c/users/...").

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published