Set bash to be more strict

This commit is contained in:
vlad 2021-12-21 02:36:12 -08:00
parent d2322c0e5e
commit b29cafb16b

9
View File

@ -1,13 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
main() { main() {
[[ $(type -t _verify-prerequisites) == "function" ]] && ! _verify-prerequisites && exit 1 [[ $(type -t _verify-prerequisites) == "function" ]] && ! _verify-prerequisites && exit 1
redefine-functions-defined-with-selector-16 redefine-functions-defined-with-selector-16
command="$1" if [[ $(type -t "⚡${1:-}") == "function" ]]; then
shift command="$1"
if [[ $(type -t "⚡$command") == "function" ]]; then shift
⚡$command "$@" ⚡$command "$@"
else else
⚡help ⚡help
@ -65,7 +66,7 @@ _wrapper() {
esac esac
done done
while [[ -n "$1" && "$1" != "--" ]]; do while [[ -n "${1:-}" && "$1" != "--" ]]; do
shift shift
done done
shift shift