chrisallenlane/cheat — pull request #100 by 0rax (2013-09-20 00:39:58+00:00)
Title: EDITOR var with spaces throw exceptions

This is a pull request to correct issue #99

EDITOR variables containing options like mine 'emacs -nw -no-init-file --quick' just made `Popen` throw back an exception, when first argument of `Popen` not set to an absolute path, `Popen` will search 1st args in $PATH, but 'emacs -nw -no-init-file --quick' is not a binary that could be found in $PATH. The fix was just to split the EDITOR variable to have binary and args in a list like Popen wants it.

Just added some check like if EDITOR is set to none + Try catch just in case EDITOR is not found in PATH (like not instaled or so).

PS : Sorry for the dirty commit message, just had a problem with my git when merging upstream with master when the last working branch was OOP.