This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
bash-shell-host/all/modules/vscode.sh

25 lines
333 B
Bash
Raw Normal View History

#!/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 $@