Fix shorthelp custom config #94

merged 3 commits into from Aug 30, 2012

2 participants


This fixes #93, adds test coverage for -h and shorthelp, and as a bonus enables -h output even when todo.txt complains about a fatal error.

Tested on Ubuntu 10.04 and Cygwin.

inkarkat added some commits Aug 30, 2012
@inkarkat inkarkat Tests: Add basic coverage of -h / shorthelp.
For a start, this is basically an adapted version of tests/
@inkarkat inkarkat FIX: Short help -h inaccessible when custom config is used.
When short-circuiting the option parsing, the OPTIND must be adapted, too, so that the getopts processing loop is quit correctly.
@inkarkat inkarkat ENH: Handle -h, shorthelp and help when a Fatal Error happens.
The user may need the help to solve any fatal error that appears while isn't properly set up. As the help actions do not depend on any setting that the fatal errors check, we can still invoke them.

Factor out dieWithHelp() and use that for printing the fatal errors.

Beautiful. All tests pass on Mac OS X. Thanks Ingo!

@ginatrapani ginatrapani merged commit e1d6b91 into ginatrapani:master Aug 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment