Skip to content

Instantly share code, notes, and snippets.

@troyk
Created February 10, 2021 18:53
Show Gist options
  • 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