I want to use shell.parse in order to pass arguments and options to my program.
I saw in the shell api guide than shell.parse can read arguments and options if they are preceded by a -.
I can take arguments but if a call my program with -p etc doesnt do anything.
Do I have to use the standard local args = ... or local args = {...}?
Another question is, what is the correct way of validating arguments and options? Do I have to force an order for arguments?
For example, there are arguments that could be written without options but another arguments can only be passed if the correct option for that argument it's passed.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hello everyone.
I want to use shell.parse in order to pass arguments and options to my program.
I saw in the shell api guide than shell.parse can read arguments and options if they are preceded by a -.
I can take arguments but if a call my program with -p etc doesnt do anything.
Do I have to use the standard local args = ... or local args = {...}?
Another question is, what is the correct way of validating arguments and options? Do I have to force an order for arguments?
For example, there are arguments that could be written without options but another arguments can only be passed if the correct option for that argument it's passed.
Link to post
Share on other sites