Skip to content

Instantly share code, notes, and snippets.

@troyk
Created February 10, 2021 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troyk/367cffb59b8e2aae23119c2b8197e577 to your computer and use it in GitHub Desktop.
Save troyk/367cffb59b8e2aae23119c2b8197e577 to your computer and use it in GitHub Desktop.
zsh must haves
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