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

Cannot use --arg=value style of CLI args #82

Open
falkTX opened this issue Aug 9, 2022 · 2 comments
Open

Cannot use --arg=value style of CLI args #82

falkTX opened this issue Aug 9, 2022 · 2 comments

Comments

@falkTX
Copy link

falkTX commented Aug 9, 2022

It is typical for CLI tools to accept both --arg=value and --arg value style of CLI arguments, but pluginval fails here.
If using something like getopt this is handled for us, seems weird to not have this working.

So here is a request for such functionality.

Complete CLI output for posterity:

% pluginval --strictness-level=10 ...
JUCE v7.0.1
Missing strictness level argument! (Must be between 1 - 10)

PS: tool does not close when provided CLI args are not recognized, I need to use Ctrl+C to stop it.

@drowaudio
Copy link
Contributor

I'm using juce::ArgumentList for this which actually defaults to the --arg=value style but I'm not really a fan because it makes it more complex to pass multiple arguments. So I actually provide a work around to add back the --arg value style as it was more familiar to me and how man pages are usually displayed.

I don't think Windows natively comes with getopt and the API looks a bit verbose for what I needed.
Maybe an approach that would work would be to use the standard juce::ArgumentList approach which works with --arg=value but parse the passed in command line to add any missing = to get it in to that form. That might work.

PS: tool does not close when provided CLI args are not recognized, I need to use Ctrl+C to stop it.
Thanks, I'll add this to the list to look in to.

@drowaudio
Copy link
Contributor

PS: tool does not close when provided CLI args are not recognized, I need to use Ctrl+C to stop it.

Fixed here:
bdd5f6a

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