Last active
November 1, 2018 10:54
-
-
Save sddamico/5b3ce62f0741f209cc0f to your computer and use it in GitHub Desktop.
paste your clipboard to a gist and copy the gist url to the clipboard
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
gistp() { | |
if [ -z "$1" ] ; then | |
echo "Must supply filename for new gist" | |
exit(1) | |
else | |
gisturl=$(pbpaste | gist -f $1) | |
echo "Copying $gisturl to clipboard" | |
echo "$gisturl" | pbcopy | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First:
brew install gist
gist --login