Commit Graph

12 Commits

Author SHA1 Message Date
Kevin van Zonneveld
28deb39d86
Fix tests 2023-08-29 12:24:49 +02:00
Gert Goet
599faf3830 Correct error_code in err_report (#124) (#125) 2019-11-18 11:56:18 +01:00
Kevin van Zonneveld
83c77f8df3 -v operator was added in bash 4.2 while we target bash 3 -- Part II 2019-10-29 08:41:01 +01:00
Lukas Stockner
95b9cb1469 Add support for repeatable arguments (#118)
* Add support for declaring arguments as repeatable

If the usage of the argument includes the phrase "Can be repeated.",
the corresponding arg_ variable will be an array containing one element
per instance of the argument.

* Add example and test for using repeated parameters

* Add example and test for using repeated flags
2019-09-20 11:40:06 +02:00
QwertyZW
7b7d31a1bf Improve debug mode (#103)
Add file, line number, function name and function line offset
2019-05-06 10:04:09 +02:00
Manuel Streuhofer
236e3c7eca fix shellcheck errors
shellcheck 0.4.7 seems to have come up with new checks and now complains
about yet more possible issues. fixed them all as good as i could.
2018-01-21 23:02:03 +01:00
Manuel Streuhofer
d879ae1fe0 fixup example.sh like 2.3.0 main.sh
__i_am_main_script logic fixed for example.sh
added double-sourced test
2017-02-10 20:40:38 +01:00
Manuel Streuhofer
d383e8c098 prepared changelog for release 2.2.0 (#82)
moved entries in changelog from `unreleased` to 2.1.0 (even
though technically it's too late for that since that version was already
released).

added new section for 2.2.0 and added some points on what changed.

bumped version to 2.2.0 in main.sh, example.sh and package.json

Closes #74
2016-12-21 09:29:02 +01:00
Manuel Streuhofer
785e7e9f8b Cleanup all *.sh following shellcheck advice (#80)
* Cleanup all *.sh following shellcheck advice

Closes #79

* do not shellcheck scripts out of our control
2016-12-16 08:18:03 +01:00
Manuel Streuhofer
ce755604da run shellcheck as part of the acceptance test (#77)
* install shellcheck from debian sid repository

* cleanup acceptance shell script

use a uniq temp directory and cleanup
make sure commands we use/need are installed

* shellcheck main.sh

* shellcheck example.sh

* shellcheck test/acceptance.sh

* brace all variables, used [[ instead of [
2016-12-15 12:57:42 +01:00
Manuel Streuhofer
cf85af8c15 brace all variables, used [[ instead of [ (#76)
Closes #33
2016-12-14 09:54:25 +01:00
Manuel Streuhofer
dfd799b4e5 b3bp sourced mode (#61)
If main.sh is being sourced instead of being executed it respects the
variables __usage and __helptext being defined beforehand. Its behaviour
will depend on the sourcing script. If __usage is defined but empty no
argument parsing is done. If __helptext is defined but empty no helptext
will be shown.

Logging support still exists as it did before. The environment variables
LOG_LEVEL and NO_COLOR are supported just as they were before.
2016-11-09 10:03:00 +01:00