From a709ef4585ac3738c36705a64efe53d4d88a3482 Mon Sep 17 00:00:00 2001 From: Valerie Wolfe Date: Fri, 14 Jun 2024 08:51:02 -0400 Subject: [PATCH] scripts: added new scripts 'dos' and 'terminal' --- README.md | 2 ++ scripts/dos.sh | 4 ++++ scripts/terminal.sh | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100755 scripts/dos.sh create mode 100755 scripts/terminal.sh diff --git a/README.md b/README.md index 394d50c..b9491c2 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ A DOS clone of `ls` that hides Windows hidden files. ## Scripts +- `dos.sh`: Simple wrapper for executing Windows commands directly. - `elevate.sh`: Elevate WSL (`-l`) or Windows (`-w`) commands from WSL. - `explorer.sh`: Launch explorer from WSL. +- `terminal.sh`: Launch Windows Terminal. diff --git a/scripts/dos.sh b/scripts/dos.sh new file mode 100755 index 0000000..6a7b4ec --- /dev/null +++ b/scripts/dos.sh @@ -0,0 +1,4 @@ +#!/usr/bin/bash + +pwsh -C "$@" + diff --git a/scripts/terminal.sh b/scripts/terminal.sh new file mode 100755 index 0000000..f0c7e63 --- /dev/null +++ b/scripts/terminal.sh @@ -0,0 +1,11 @@ +#!/usr/bin/bash + +wrapper='dos' +if [[ "$1" == "-e" ]]; then + wrapper='elevate -w' +fi + +cd '/mnt/c/Program Files/WindowsApps/' +target=`find Microsoft.WindowsTerminal* -name 'WindowsTerminal.exe'` +$wrapper "$target" +