Closed stellarhopper closed 1 year ago
Why not just make debug a boolean and do this: https://github.com/CoBrALab/iterativeN4_multispectral/blob/master/iterativeN4_multispectral.sh#L267-L272
@gdevenyi yes that is my workaround currently. But having a continu-able action would make some of that a lot cleaner.
Closing this for the reason outined by @gdevenyi. The idea behind Argbash is to do the simple things in a simple way, standard things in a somewhat simple way, and still let users do more complex things on top of what Argbash produces. I think that bool arguments are fine, sorry for still generating the --no-
negations, hopefully that won't be in Argbash forever.
It would be nice to have a version of
ARG_OPTIONAL_ACTION
that executesACTION
, but continues with the script instead of exiting.My use case for this would be something like:
ARG_OPTIONAL_ACTION([debug], [d], [Debug script problems (enables set -x)], [set -x])
i.e. this would set flags or so if supplied, but otherwise continue the script as normal.I'm assuming this would need a new API - maybe
ARG_OPTIONAL_ACTION_CONTINUE
? I can try implementing it if this sounds reasonable.