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

CLI flag followed by value removes the value #63

Closed
Aerion opened this issue Jun 28, 2022 · 1 comment · Fixed by #66
Closed

CLI flag followed by value removes the value #63

Aerion opened this issue Jun 28, 2022 · 1 comment · Fixed by #66

Comments

@Aerion
Copy link
Contributor

Aerion commented Jun 28, 2022

Hello,

When the last CLI flag is one that doesn't expect any argument (e.g. --osd), the last CLI argument is not taken into accound.

To reproduce, in its simplest form

# Expected results: displays the output
$ pulseaudio-control --osd output
Unrecognised action:
# Expected results: throws an error as this_argument_is_ignored is invalid
$ pulseaudio-control --osd this_argument_is_ignored output
64% Sink #69

There is a workaround: to either follow it with a random arg that will get discarded, or ensure that the following argument is a one starting with --.

Best,

@marioortizmanero
Copy link
Owner

Oh, you're right. I don't know how we hadn't caught this before, thanks. The logic in the argument parser is wrong, it's fixed in #66. Take a look and let me know if that fixes your issue.

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

Successfully merging a pull request may close this issue.

2 participants