mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2024-12-19 22:57:51 +00:00
For delete-key-friendliness, don't crash on undeclared help vars
This commit is contained in:
parent
83b13e5f55
commit
4926bbc942
@ -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
|
||||||
|
4
main.sh
4
main.sh
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user