Skip to content

Value starting with - is mistreated as extra option  #890

Description

@sandreas

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions