Commit Graph

14 Commits

Author SHA1 Message Date
Manuel Streuhofer
9350e0574c added automatic usage validation for required args
If the description of an option contains the single word sentence
'Required.' it is understood as a required argument and automatic
validation will make sure that it is set or end the script by calling
help.

Alternatively, if the argument within the __usage string is {arg}
instead of [arg] it is understood as a required argument and automatic
validation will make sure that it is set or end the script by calling
help (even if 'Required.' is not in the description).

Closes #22
2016-12-09 00:54:52 +01:00
Manuel Streuhofer
1e69fd5e21 removed all usage of eval, proper usage of unset
replaced all `eval` with `printf -v` for security reasons.

the behaviour of unset without -v/-f is actually undefined so make the
intent clear.
2016-12-06 18:06:25 +01:00
Manuel Streuhofer
539443b3ca Allow for multiline opt description in __usage. Fixes #7 2016-11-11 20:13:01 +01:00
Kevin van Zonneveld
abb480c394 Use accptst prefix so we can re-use this thing elsewhere 2016-02-23 10:06:45 +01:00
Kevin van Zonneveld
1271bf807d Add tests for megamount and follow Library export best practices 2016-02-17 13:38:55 +01:00
Kevin van Zonneveld
7fbf9ea8e5 Add tests for templater and follow Library export best practices 2016-02-17 13:19:03 +01:00
Kevin van Zonneveld
707583a93c Fix paths 2016-02-17 13:01:18 +01:00
Kevin van Zonneveld
e538a2be34 Rename inival->ini_val 2016-02-17 12:58:28 +01:00
Kevin van Zonneveld
c3f5bcf8c9 Add tests for parse_url and follow Library export best practices 2016-02-17 12:58:18 +01:00
Kevin van Zonneveld
180282d97d Add tests for ini_val and follow Library export best practices 2016-02-17 12:48:57 +01:00
Kevin van Zonneveld
d365e8dcea Allow disabling colors via NO_COLOR environment variable 2016-02-16 22:19:40 +01:00
Kevin van Zonneveld
56721e9cd5 Add test for longopt parsing 2016-02-16 22:05:11 +01:00
Kevin van Zonneveld
30cfd19fd9 Add debug test scenario 2016-02-16 15:49:37 +01:00
Kevin van Zonneveld
63cd89a659 Set up basic acceptance testing #4 2016-02-16 15:01:26 +01:00