Last active
August 29, 2017 12:09
-
-
Save metaskills/0430a2413503d93540ad4b0ebffc93ae to your computer and use it in GitHub Desktop.
Shell Function for Git.io
This file contains hidden or 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
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Makes use of OS X's pasteboard copy
pbcopy
tool.