by wrboyce · 5y ago · 0 comments
vscodetmp () {
local repo=$1
[[ ! $repo =~ "https://*" ]] && repo="https://github.com/${repo}"
local temp="$(mktemp -d)"
git clone "${repo}" "${temp}"
code --wait -n "${temp}"
rm -rf "${temp}"
}