argbash
argbash copied to clipboard
Allow ARG_LEFTOVERS after ARG_POSITIONAL_INF if ARG_POSITIONAL_DOUBLEDASH specified between them
I have an implementation I'd like to write where the script functions as a wrapper, launching another program, where I'd like to be able to pass an arbitrary amount of arguments to that script. Before I do that, I may have an arbitrary number of positional inputs to the wrapper.
I'd like it to operate like so:
$ ./script <input1> ... <inputN> -- <arbitrary argument1> .. <arbitrary argument N>
I tried to implement it like this:
# ARG_POSITIONAL_INF([inputs],[input arguments],[1])
# ARG_POSITIONAL_DOUBLEDASH([])
# ARG_LEFTOVERS([arbitrary arguments to be ])
However argbash doesn't like this:
stdin:38: error: We already expect arbitrary number of arguments before 'leftovers'. This is not supported
stdin:38: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
Error during autom4te run, aborting!