Skip to content

Instantly share code, notes, and snippets.

@metaskills
Last active August 29, 2017 12:09
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 metaskills/0430a2413503d93540ad4b0ebffc93ae to your computer and use it in GitHub Desktop.
Save metaskills/0430a2413503d93540ad4b0ebffc93ae to your computer and use it in GitHub Desktop.
Shell Function for Git.io
gitio () {
local url=$(curl -s -i https://git.io -F "url=$1" | grep "Location: " | cut -d" " -f2)
echo -n $url | tr -d '\n' | pbcopy
echo $url
}
@metaskills
Copy link
Author

Makes use of OS X's pasteboard copy pbcopy tool.

@csexton
Copy link

csexton commented Aug 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment