Created
February 10, 2021 18:53
-
-
Save troyk/367cffb59b8e2aae23119c2b8197e577 to your computer and use it in GitHub Desktop.
zsh must haves
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hubcode () { | |
local repo=$1 | |
[[ ! $repo =~ "https://*" ]] && repo="https://github.com/${repo}" | |
local temp="$(mktemp -d)" | |
git clone --depth 1 "${repo}" "${temp}" | |
code --wait -n "${temp}" | |
rm -rf "${temp}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment