3 ms·
git commit -m "$(curl -s programmerexcuses.com | sed -n '/<a.>/{s/<[^>]>//g;p}')"
by fbernier 12y ago
git commit -m "$(curl -s programmerexcuses.com | sed -n '/<a.>/{s/<[^>]>//g;p}')"
- chrismorgan 12y agoI would prefer it to give just the message when the request contains the `Accept: text/plain` header.
- vardump 12y agoI'd like to commit a bugfix: git commit -m "$(curl -s programmerexcuses.com | sed -n '/<a.*>/{s/<[^>]*>//g;p}')"
- biscotti 12y agowww.whatthecommit.com alternative to this: git commit -m "$(curl -s http://whatthecommit.com | grep -o '<p>.*' | sed 's|<[^>]*>||g')"
- stevelaz 12y agoOr you can use it in your post-commit hook: https://gist.github.com/stevelaz/daecc32e0a8f2758b649 https://gist.github.com/stevelaz/daecc32e0a8f2758b649
- ShaneOG 12y agoAnd for any OS X user (* BSD based sed) curl -s programmerexcuses.com | sed -n -e '/<a.*>/{s/<[^>]*>//g;' -e 'p' -e '}' git commit -m "$(curl -s programmerexcuses.com | sed -n -e '/<a.*>/{s/<[^>]*>//g;' -e 'p' -e '}')"
- mikegirouard 12y agoYou read my mind. I would have preferred a more client-aware response, similar to http://ifconfig.me/ http://ifconfig.me/, so that you can save the sed call.