scripts: added 'wsl.sh'

This commit is contained in:
Valerie Wolfe 2024-08-27 09:05:25 -04:00
parent 697929c8ad
commit 2f8f14d77d
3 changed files with 9 additions and 0 deletions

View file

@ -45,6 +45,7 @@ A feature-barren DOS clone of `ls` that hides Windows hidden files. Relies on
- `elevate.sh`: Elevate WSL (`-l`) or Windows (`-w`) commands from WSL. - `elevate.sh`: Elevate WSL (`-l`) or Windows (`-w`) commands from WSL.
- `explorer.sh`: Launch explorer from WSL. - `explorer.sh`: Launch explorer from WSL.
- `pwsh.sh`: Launch PowerShell Core. - `pwsh.sh`: Launch PowerShell Core.
- `wsl.sh`: A wrapper for `wsl.exe` that wraps in `hug` when piped.
- `wt.sh`: Launch Windows Terminal. - `wt.sh`: Launch Windows Terminal.
--- ---

View file

@ -8,5 +8,6 @@ install DIR="/usr/local/bin":
cp elevate.sh {{DIR}}/elevate cp elevate.sh {{DIR}}/elevate
cp explorer.sh {{DIR}}/explorer cp explorer.sh {{DIR}}/explorer
cp pwsh.sh {{DIR}}/pwsh cp pwsh.sh {{DIR}}/pwsh
cp wsl.sh {{DIR}}/wsl
cp wt.sh {{DIR}}/wt cp wt.sh {{DIR}}/wt

7
scripts/wsl.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/bash
if [[ ! -t 1 ]]; then
WRAPPER='hug'
fi
$WRAPPER '/mnt/c/Windows/System32/wsl.exe' $@