Skip to content

Instantly share code, notes, and snippets.

@scottrobertson
Created August 29, 2013 14:59
Show Gist options
  • Save scottrobertson/6379205 to your computer and use it in GitHub Desktop.
Save scottrobertson/6379205 to your computer and use it in GitHub Desktop.
Quick gist bash function
function g {
if [ -f $1 ];
then
GIST=$(gist $1)
else
GIST=$(gist <<< $1)
fi
echo $GIST | pbcopy
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment