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

Value starting with - is mistreated as extra option #890

Closed
sandreas opened this issue Jul 3, 2022 · 2 comments · Fixed by #1048
Closed

Value starting with - is mistreated as extra option #890

sandreas opened this issue Jul 3, 2022 · 2 comments · Fixed by #1048
Assignees
Labels
bug Something isn't working

Comments

@sandreas
Copy link

sandreas commented Jul 3, 2022

Information

  • OS: Linux, Ubuntu 18.04 LTS
  • Version: 0.44
  • Terminal: xterm-256color, zsh

Describe the bug
Providing a valid value starting with - throws an exception / error, when using the following syntax:

# value `-size` is short form for `size descending`
cli-tester test input.mp3 --order-by "-size"

Error: Option 'order-by' is defined but no value has been provided.

       test input.mp3 --order-by -size
                      ^^^^^^^^^^ No value provided

Using the syntax with = as value separator works like expected:

cli-tester test input.mp3 --order-by="-size"

# works like expected, prints out the unmodified option value for `--order-by`
order-by=<-size>

To Reproduce

Expected behavior
I would expect that option valid values with leading - would be correctly handled when NOT using = as separator, otherwise the behaviour is inconsistent in my opinion.

@FrankRay78
Copy link
Contributor

This is a value bug imho - see the justification here: #959 (comment)

@FrankRay78
Copy link
Contributor

This issue can be closed/marked as complete @patriksvensson, now that PR #1048 has been successfully merged.

@FrankRay78 FrankRay78 self-assigned this Dec 11, 2022
@FrankRay78 FrankRay78 linked a pull request Dec 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done 🚀
Development

Successfully merging a pull request may close this issue.

3 participants