Skip to content

Instantly share code, notes, and snippets.

@scaryrawr
Created December 10, 2021 14:45
Show Gist options
  • Save scaryrawr/b02442335b39bacb7ef36cad20a9e937 to your computer and use it in GitHub Desktop.
Save scaryrawr/b02442335b39bacb7ef36cad20a9e937 to your computer and use it in GitHub Desktop.
WSL helper for running Windows commands from within WSL
#!/usr/bin/env bash
currentDirectory=$(wslpath -w .)
cmd.exe /c "pushd $currentDirectory && $@" 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment