Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Created September 28, 2014 00:18
Show Gist options
  • Save ttscoff/d1f6162d97db2f076143 to your computer and use it in GitHub Desktop.
Save ttscoff/d1f6162d97db2f076143 to your computer and use it in GitHub Desktop.
An experiment with calling `doing` with an "im" function to see how far natural language status updates will go. "im planning out the book structure" => `doing now @planning out the book structure` (http://brettterpstra.com/projects/doing/)
# experiment with doing
# im planning out the book structure => @planning out the book structure
# im waiting for her to call me back => @waiting for her to call me back
# im done wishing for ponies => wishing for ponies @done()
# im hungry => hungry
im() {
local verb=$1
shift
if [[ $verb =~ ing$ ]]; then
doing now "@$verb $*"
elif [[ $verb =~ (done|finished) ]]; then
doing done "$*"
else
doing now "$*"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment