Created
August 29, 2013 14:59
-
-
Save scottrobertson/6379205 to your computer and use it in GitHub Desktop.
Quick gist bash function
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
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