Compare commits
2 commits
c097159c05
...
0f39033c5d
Author | SHA1 | Date | |
---|---|---|---|
0f39033c5d | |||
63f8e69afc |
4 changed files with 13 additions and 6 deletions
|
@ -28,5 +28,6 @@ A feature-barren DOS clone of `ls` that hides Windows hidden files. Relies on
|
||||||
- `dos.sh`: Simple wrapper for executing Windows commands directly.
|
- `dos.sh`: Simple wrapper for executing Windows commands directly.
|
||||||
- `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.
|
||||||
- `terminal.sh`: Launch Windows Terminal.
|
- `terminal.sh`: Launch Windows Terminal.
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,12 @@ if [[ "$1" == "-l" ]]; then
|
||||||
elif [[ "$1" == "-w" ]]; then
|
elif [[ "$1" == "-w" ]]; then
|
||||||
mode='dos'
|
mode='dos'
|
||||||
shift
|
shift
|
||||||
fi
|
# error if no target for DOS
|
||||||
|
|
||||||
# error if no target
|
|
||||||
if [ "$#" -eq 0 ]; then
|
if [ "$#" -eq 0 ]; then
|
||||||
echo "elevate: no target"
|
echo "elevate: DOS mode requires a target"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# consume target based on mode
|
# consume target based on mode
|
||||||
if [[ "$mode" == "linux" ]]; then
|
if [[ "$mode" == "linux" ]]; then
|
||||||
|
|
|
@ -5,5 +5,6 @@ install DIR="~/.bin":
|
||||||
cp dos.sh {{DIR}}/dos
|
cp dos.sh {{DIR}}/dos
|
||||||
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 terminal.sh {{DIR}}/terminal
|
cp terminal.sh {{DIR}}/terminal
|
||||||
|
|
||||||
|
|
6
scripts/pwsh.sh
Executable file
6
scripts/pwsh.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
cd '/mnt/c/Program Files/WindowsApps/'
|
||||||
|
target=`find Microsoft.PowerShell* -name 'pwsh.exe'`
|
||||||
|
"$target"
|
||||||
|
|
Loading…
Reference in a new issue