Set bash to be more strict
This commit is contained in:
parent
d2322c0e5e
commit
b29cafb16b
9
⚡
9
⚡
@ -1,13 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
main() {
|
||||
[[ $(type -t _verify-prerequisites) == "function" ]] && ! _verify-prerequisites && exit 1
|
||||
|
||||
redefine-functions-defined-with-selector-16
|
||||
|
||||
command="$1"
|
||||
shift
|
||||
if [[ $(type -t "⚡$command") == "function" ]]; then
|
||||
if [[ $(type -t "⚡${1:-}") == "function" ]]; then
|
||||
command="$1"
|
||||
shift
|
||||
⚡$command "$@"
|
||||
else
|
||||
⚡help
|
||||
@ -65,7 +66,7 @@ _wrapper() {
|
||||
esac
|
||||
done
|
||||
|
||||
while [[ -n "$1" && "$1" != "--" ]]; do
|
||||
while [[ -n "${1:-}" && "$1" != "--" ]]; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
Loading…
Reference in New Issue
Block a user