scripts: added new scripts 'dos' and 'terminal'

This commit is contained in:
Valerie Wolfe 2024-06-14 08:51:02 -04:00
parent 40e33e7023
commit a709ef4585
3 changed files with 17 additions and 0 deletions

View file

@ -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.

4
scripts/dos.sh Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/bash
pwsh -C "$@"

11
scripts/terminal.sh Executable file
View file

@ -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"