diff options
Diffstat (limited to 'sh/wsl.sh')
-rw-r--r-- | sh/wsl.sh | 31 |
1 files changed, 16 insertions, 15 deletions
@@ -4,29 +4,30 @@ export EDITOR="code --wait" alias cb=clip.exe alias wsl=wsl.exe -alias ykman="/mnt/c/Program\ Files/Yubico/YubiKey\ Manager/ykman.exe" +alias ykman='/mnt/c/Program\ Files/Yubico/YubiKey\ Manager/ykman.exe' -function wt() { powershell.exe -NoProfile -c "wt $@" } +function wt() { + powershell.exe -NoProfile -c "wt $@" +} function winget() { cmd="winget.exe $1" shift # past cmd - while [[ $# -gt 0 ]] - do + 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 - ;; + -*) # 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 +} |