diff options
| author | navewindre <boneyaard@gmail.com> | 2025-07-13 06:42:05 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-07-13 06:42:05 +0200 |
| commit | 02f14a9cb152561a5e44062aac79f3b700403b40 (patch) | |
| tree | 2db8ebda3b7f6f8777783aeb5c60018e6e1359d8 /home/.oh-my-zsh/plugins/vscode/vscode.plugin.zsh | |
| parent | cbbdeb2f6b40a102a829f0c47cff052937231f00 (diff) | |
omz
Diffstat (limited to 'home/.oh-my-zsh/plugins/vscode/vscode.plugin.zsh')
| -rw-r--r-- | home/.oh-my-zsh/plugins/vscode/vscode.plugin.zsh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/home/.oh-my-zsh/plugins/vscode/vscode.plugin.zsh b/home/.oh-my-zsh/plugins/vscode/vscode.plugin.zsh new file mode 100644 index 0000000..77367bc --- /dev/null +++ b/home/.oh-my-zsh/plugins/vscode/vscode.plugin.zsh @@ -0,0 +1,50 @@ +# VS Code (stable / insiders) / VSCodium zsh plugin +# Authors: +# https://github.com/MarsiBarsi (original author) +# https://github.com/babakks +# https://github.com/SteelShot +# https://github.com/AliSajid + +# 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 + +function vsc { + if (( $# )); then + $VSCODE $@ + else + $VSCODE . + fi +} + +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 vscp="$VSCODE --profile" + +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" |
