diff --git a/README.md b/README.md index b233d59..e671610 100644 --- a/README.md +++ b/README.md @@ -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. - `explorer.sh`: Launch explorer from WSL. - `pwsh.sh`: Launch PowerShell Core. +- `wsl.sh`: A wrapper for `wsl.exe` that wraps in `hug` when piped. - `wt.sh`: Launch Windows Terminal. --- diff --git a/scripts/justfile b/scripts/justfile index b5dac21..bd1f6db 100644 --- a/scripts/justfile +++ b/scripts/justfile @@ -8,5 +8,6 @@ install DIR="/usr/local/bin": cp elevate.sh {{DIR}}/elevate cp explorer.sh {{DIR}}/explorer cp pwsh.sh {{DIR}}/pwsh + cp wsl.sh {{DIR}}/wsl cp wt.sh {{DIR}}/wt diff --git a/scripts/wsl.sh b/scripts/wsl.sh new file mode 100755 index 0000000..376162e --- /dev/null +++ b/scripts/wsl.sh @@ -0,0 +1,7 @@ +#!/usr/bin/bash + +if [[ ! -t 1 ]]; then + WRAPPER='hug' +fi +$WRAPPER '/mnt/c/Windows/System32/wsl.exe' $@ +