Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Is there any way to ignore not defined option? #31

Open
sph3rex opened this issue Jul 28, 2021 · 1 comment
Open

[Question] Is there any way to ignore not defined option? #31

sph3rex opened this issue Jul 28, 2021 · 1 comment

Comments

@sph3rex
Copy link

sph3rex commented Jul 28, 2021

My use case is something like this:

I have an sh file that is used as a proxy for a binary. However I want to only parse "some" options while forwarding the others to the binary. Example: my.sh --proxy-option 1 --opt1 --opt2 - I want to only parse proxy-option while having the other options in "$@" (--opt1 --opt2). Is this possible?

@sph3rex sph3rex changed the title Is there any way to ignore not defined option? [Question] Is there any way to ignore not defined option? Jul 28, 2021
@sph3rex sph3rex closed this as completed Jul 28, 2021
@sph3rex sph3rex reopened this Jul 28, 2021
@ko1nksm
Copy link
Owner

ko1nksm commented Jul 28, 2021

That feature was implemented in v2.5 as scanning mode = and #, but was removed in v3.0 due to insufficient support for the combined short option.

# I want to only parse -p
my.sh -p -a -b # good
my.sh -pab     # problem

It is a feature I would like to have, so I will consider re-implementing it.

BTW, I think it would be useful to have a tool that can easily create wrapper scripts. This seems to be what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants