25 lines
333 B
Bash
25 lines
333 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
command -v code >/dev/null 2>&1 || exit
|
||
|
|
||
|
vscode () {
|
||
|
|
||
|
home=${VSCODE_HOME:-$1}
|
||
|
home=${home:-$HOME}
|
||
|
echo $home
|
||
|
exts=${home}/extensions
|
||
|
user=${home}/user
|
||
|
exe=$(command -v code)
|
||
|
$exe --user-data-dir=$user --extensions-dir=$exts
|
||
|
|
||
|
}
|
||
|
|
||
|
# # if script was executed then call the function
|
||
|
(return 0 2>/dev/null) || vscode $@
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|