scripts: added new scripts 'dos' and 'terminal'
This commit is contained in:
parent
40e33e7023
commit
a709ef4585
3 changed files with 17 additions and 0 deletions
|
@ -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
4
scripts/dos.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
pwsh -C "$@"
|
||||
|
11
scripts/terminal.sh
Executable file
11
scripts/terminal.sh
Executable 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"
|
||||
|
Loading…
Reference in a new issue