blob: 48d90437702d696b4df53b2055138c8e7efaf5fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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"
|