diff options
author | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
---|---|---|
committer | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
commit | edc449275b6c04445f58b108ca0937a87c1e8430 (patch) | |
tree | 9fd484d58145b616f29a78857cc0b1c8b1c18f05 /oh-my-zsh/plugins/vscode/vscode.plugin.zsh | |
parent | 6f5424ca96c4221ef433f545642669e9c104d0ed (diff) |
add zsh
Diffstat (limited to 'oh-my-zsh/plugins/vscode/vscode.plugin.zsh')
-rw-r--r-- | oh-my-zsh/plugins/vscode/vscode.plugin.zsh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/oh-my-zsh/plugins/vscode/vscode.plugin.zsh b/oh-my-zsh/plugins/vscode/vscode.plugin.zsh new file mode 100644 index 0000000..48d9043 --- /dev/null +++ b/oh-my-zsh/plugins/vscode/vscode.plugin.zsh @@ -0,0 +1,41 @@ +# VS Code (stable / insiders) / VSCodium zsh plugin +# Authors: +# https://github.com/MarsiBarsi (original author) +# https://github.com/babakks +# https://github.com/SteelShot + +# Verify if any manual user choice of VS Code exists first. +if [[ -n "$VSCODE" ]] && ! which $VSCODE &>/dev/null; then + echo "'$VSCODE' flavour of VS Code not detected." + unset VSCODE +fi + +# Otherwise, try to detect a flavour of VS Code. +if [[ -z "$VSCODE" ]]; then + if which code &>/dev/null; then + VSCODE=code + elif which code-insiders &>/dev/null; then + VSCODE=code-insiders + elif which codium &>/dev/null; then + VSCODE=codium + else + return + fi +fi + +alias vsc="$VSCODE ." +alias vsca="$VSCODE --add" +alias vscd="$VSCODE --diff" +alias vscg="$VSCODE --goto" +alias vscn="$VSCODE --new-window" +alias vscr="$VSCODE --reuse-window" +alias vscw="$VSCODE --wait" +alias vscu="$VSCODE --user-data-dir" + +alias vsced="$VSCODE --extensions-dir" +alias vscie="$VSCODE --install-extension" +alias vscue="$VSCODE --uninstall-extension" + +alias vscv="$VSCODE --verbose" +alias vscl="$VSCODE --log" +alias vscde="$VSCODE --disable-extensions" |