Initial commit - add basic utilities

This commit is contained in:
Fernando Schauenburg 2022-01-21 11:49:17 +01:00
commit 9f35c36ad3
4 changed files with 27 additions and 0 deletions

14
README.md Normal file
View file

@ -0,0 +1,14 @@
# WSL Helpers
These are small scripts to help with living in the WSL on Windows. Mostly
wrappers to easily run Windows executables without having to hunt down the full
path to the binaries.
# Scripts
- `explorer`: open current directory in Windows Explorer
- `ipfonfig`: use Windows' `ipconfig` command, WSL does not provide or support
`ifconfig` (kind of redundant because we can use `ip` in the WSL but keeping
it here anyway for convenience)
- `wsl`: use the WSL to WSL the WSL.

7
bin/explorer Normal file
View file

@ -0,0 +1,7 @@
#!/bin/sh
/mnt/c/Windows/explorer.exe "$(wslpath -w "$@")"
# The Windows Explorer binary seems to always return 1, even though it
# succesully opens the desired folder. So, executing `true` here is just a
# hack so that we have a nice return code from our script.
true

3
bin/ipconfig Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
exec /mnt/c/Windows/System32/ipconfig.exe "$@"

3
bin/wsl Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
exec /mnt/c/Windows/System32/wsl.exe "$@"