Created
February 11, 2014 08:26
-
-
Save popomore/8931127 to your computer and use it in GitHub Desktop.
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
# install gist by `brew install gist` | |
# | |
# create gist on first time | |
# update gist when .gistid exists | |
function gist() { | |
local gistid | |
args=$@ | |
if [ -f .gistid ]; then | |
gistid=$(cat .gistid) | |
fi | |
if [[ "$args" != *"-u"* ]] && [ "$gistid" != "" ]; then | |
args=($args -u $gistid) | |
fi | |
/usr/local/bin/gist -c $args > .gistid | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment