nulltask / osc-cli

osc command-line interface
10 stars 2 forks source link

Cannot send negative ints #4

Open BenBergman opened 6 years ago

BenBergman commented 6 years ago

I am trying to send -1 over OSC to my custom app. Sending from other applications works as expected but not from osc-cli.

When I try to do the following:

osc --host 127.0.0.1:12345 /test "-1"

the osc library in my app says that no arguments were provided in the OSC message. Putting positive integers in quotes works as expected. Leaving out the quotes I'm sure would confuse the argument parser.

BenBergman commented 6 years ago

Upon further testing, I believe this is an issue with commander. If I put the --host option at the end of the line, it gets parsed out just the same. I can even put --host in quotes and it runs fine. Trying to send string arguments to osc-cli that start with a - are also problematic.

plroebuck commented 6 years ago

Typically, -- is used to terminate argument parsing; everything remaining should be passed as a positional argument.

Try:

osc --host 127.0.0.1:12345 -- /test -1

If that works, perhaps all that is needed is documentation update to explain what to do.

BenBergman commented 6 years ago

Yup, that works. Thanks for the tip.