diff options
Diffstat (limited to 'shell/wsl.sh')
-rw-r--r-- | shell/wsl.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/shell/wsl.sh b/shell/wsl.sh new file mode 100644 index 0000000..4a876df --- /dev/null +++ b/shell/wsl.sh @@ -0,0 +1,30 @@ +export EDITOR=code + +alias cb=clip.exe +alias wsl=wsl.exe +alias ykman="/mnt/c/Program\ Files/Yubico/YubiKey\ Manager/ykman.exe" + +function wt() { powershell.exe -NoProfile -c "wt $@" } + +function winget() { + cmd="winget.exe $1" + shift # past cmd + + while [[ $# -gt 0 ]] + do + key="$1" + case $key in + -*) # key value pair + cmd+=" $key '$2'" + shift # past argument + shift # past value + ;; + *) # positional argument + cmd+=" '$1'" # add it to the list + shift # past argument + ;; + esac + done + + powershell.exe -NoProfile -c "$cmd" +}
\ No newline at end of file |