Skip to content

Instantly share code, notes, and snippets.

@OrenBochman
Forked from sddamico/gistp.sh
Created November 1, 2018 10:54
Show Gist options
  • Save OrenBochman/c53dd3f3d73b6b7d3f0e8d8f07883e9b to your computer and use it in GitHub Desktop.
Save OrenBochman/c53dd3f3d73b6b7d3f0e8d8f07883e9b to your computer and use it in GitHub Desktop.
paste your clipboard to a gist and copy the gist url to the clipboard
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