Skip to content

ysoftwareab/sane.bash

Repository files navigation

sane.bash

For the future "you" 🫵 to keep on enjoying GNU Bash.

Why sane.bash

For many decades now, we've had an unofficial Bash strict mode (Reddit), essentially set -euo pipefail.

Except GNU Bash evolved - errtrace functrace inherit_errexit and then there's one last thing (tm): stack trace on failure.

sane.bash wraps all that up in a script to import (source) or simply copy-paste since a little copying is better than a little dependency .

docs-sane.bash is the same code but with inline documentation.

reference-sane.bash is the same code, minus the documentation, compact, adding argument parsing,
acting as a full reference/template for a copy-paste approach instead of sourcing.

Usage

Have a look at the example and example-inline for usage and docs.

bash mentions

License

MIT

About

For the future you to keep on enjoying GNU Bash.

Topics

Resources

License

Code of conduct

Contributing

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors