Skip to content

Instantly share code, notes, and snippets.

@jdp
Forked from defunkt/.bashrc
Created July 9, 2009 04:22
Show Gist options
  • Save jdp/143424 to your computer and use it in GitHub Desktop.
Save jdp/143424 to your computer and use it in GitHub Desktop.
Tweet function for fish shell
# $ tweet Hi mom!
#
# Put this in ~/.bashrc or wherever.
# If it doesn't work, make sure your ~/.netrc is right
#
# (Thanks to @anildigital and @grundprinzip for curl-fu)
function tweet {
curl -n -d status="$*" https://twitter.com/statuses/update.xml --insecure &> /dev/null
echo "tweet'd"
}
# put this in ~/.netrc
machine twitter.com
login USERNAME
password PASSWORD
# $ tweet Hi mom!
#
# Put this in ~/.config/fish/config.fish or wherever.
# If it doesn't work, make sure your ~/.netrc is right
#
# (Thanks to @anildigital and @grundprinzip for curl-fu)
# (Thanks to @defunkt for the original bash function)
function tweet
curl -n -d status="$argv" https://twitter.com/statuses/update.xml --insecure > /dev/null
echo "tweet'd"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment