matejak / argbash

Bash argument parsing code generator
Other
1.39k stars 63 forks source link

make compatible with errexit and nounset #165

Closed nicola-lunghi closed 1 year ago

nicola-lunghi commented 1 year ago

If used with nounset and errexit arrbash code fails

In particular it doesn't initialize all the options at start

_arg_command=""
_arg_help=""
_positionals=()
matejak commented 1 year ago

Please provide a more exhaustive example. If the snippet above is considered as not initialized by Bash (I am not sure from the top of my head), then it's hard to do anything about it.