You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to stop handling option parsing after some argument. This is useful for creating scripts that need to pass arguments when invoking shell commands. For example this sample code does not work as intended:
Usage: playground/playground.lua [-s] [-h] <input> [<args>] ...
Error: unknown option '-c'
Did you mean one of these: '-h' '-s'?
What I would expect is when input is consumed the argparser:handle_options(false) would cancel argparser to handle options and the above example would outputs a1 a2 -c.
The text was updated successfully, but these errors were encountered:
@daurnimator I made a "hack" by injecting -- into the args just after parsing the first input argument. Not a pretty solution, but worked for me, the code can be seen here:
I am unable to stop handling option parsing after some argument. This is useful for creating scripts that need to pass arguments when invoking shell commands. For example this sample code does not work as intended:
When running with
lua test.lua -s file a1 a2 -c
:What I would expect is when input is consumed the
argparser:handle_options(false)
would cancel argparser to handle options and the above example would outputsa1 a2 -c
.The text was updated successfully, but these errors were encountered: