For delete-key-friendliness, don't crash on undeclared help vars

This commit is contained in:
Kevin van Zonneveld 2016-06-21 13:38:47 +02:00
parent 83b13e5f55
commit 4926bbc942
2 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@
Released: Unreleased. [Commit log](https://github.com/kvz/bash3boilerplate/compare/v2.0.0...master) Released: Unreleased. [Commit log](https://github.com/kvz/bash3boilerplate/compare/v2.0.0...master)
- For delete-key-friendliness, don't crash on undeclared help vars
- Introduce `errtrace`, which is on by default (BREAKING) - Introduce `errtrace`, which is on by default (BREAKING)
- Add a configurable `helptext` that is left alone by the parses and allows you to have a richer help - Add a configurable `helptext` that is left alone by the parses and allows you to have a richer help
- Add a simple documentation website - Add a simple documentation website

View File

@ -118,9 +118,9 @@ function help () {
echo "" 1>&2 echo "" 1>&2
echo " ${@}" 1>&2 echo " ${@}" 1>&2
echo "" 1>&2 echo "" 1>&2
echo " ${__usage}" 1>&2 echo " ${__usage:-No usage available}" 1>&2
echo "" 1>&2 echo "" 1>&2
echo " ${__helptext}" 1>&2 echo " ${__helptext:-}" 1>&2
echo "" 1>&2 echo "" 1>&2
exit 1 exit 1
} }