Created
September 28, 2014 00:18
-
-
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/)
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
# 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