Issue when using - as stdin and stdout
Hi,
thanks for your nice work.
I have an issue when I declare my arguments as follows:
-f --format (output format) -o --output (output file, - is supported for using stdout) input-file (input file, - is supported for stdin)
But when I run my app as follows,
app -f json -o - input.file
then - is used as input-file and input.file is bound to -o.
This is rather unexpected.
Hi @carstencodes, thank you for reporting this bug.
Is it possible to use something like ~ or any other character to indicate stin/stdout?
The problem probably is that - is parsed as an option instead of value.
I don't have a lot of time to look at this right now, but I'm happy to review PRs that fix this.
Hi,
I try to be as unix compatible as possible in my application. And the convention here is to use the minus for these streams.
I have read the code a bit and I think the issue is really weird, but bound to a faulty (or rather non-existent) state machine in the ArgumentManager class.
This might take a bit, maybe I'll figure it out ...