]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/vscode/vscode.plugin.zsh
48d90437702d696b4df53b2055138c8e7efaf5fe
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / vscode / vscode.plugin.zsh
1 # VS Code (stable / insiders) / VSCodium zsh plugin
2 # Authors:
3 #   https://github.com/MarsiBarsi (original author)
4 #   https://github.com/babakks
5 #   https://github.com/SteelShot
6
7 # Verify if any manual user choice of VS Code exists first.
8 if [[ -n "$VSCODE" ]] && ! which $VSCODE &>/dev/null; then
9   echo "'$VSCODE' flavour of VS Code not detected."
10   unset VSCODE
11 fi
12
13 # Otherwise, try to detect a flavour of VS Code.
14 if [[ -z "$VSCODE" ]]; then
15   if which code &>/dev/null; then
16     VSCODE=code
17   elif which code-insiders &>/dev/null; then
18     VSCODE=code-insiders
19   elif which codium &>/dev/null; then
20     VSCODE=codium
21   else
22     return
23   fi
24 fi
25
26 alias vsc="$VSCODE ."
27 alias vsca="$VSCODE --add"
28 alias vscd="$VSCODE --diff"
29 alias vscg="$VSCODE --goto"
30 alias vscn="$VSCODE --new-window"
31 alias vscr="$VSCODE --reuse-window"
32 alias vscw="$VSCODE --wait"
33 alias vscu="$VSCODE --user-data-dir"
34
35 alias vsced="$VSCODE --extensions-dir"
36 alias vscie="$VSCODE --install-extension"
37 alias vscue="$VSCODE --uninstall-extension"
38
39 alias vscv="$VSCODE --verbose"
40 alias vscl="$VSCODE --log"
41 alias vscde="$VSCODE --disable-extensions"