summaryrefslogtreecommitdiffstatshomepage
path: root/sh/wsl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/wsl.sh')
-rw-r--r--sh/wsl.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/sh/wsl.sh b/sh/wsl.sh
new file mode 100644
index 0000000..4a876df
--- /dev/null
+++ b/sh/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