Closed BryanCrotaz closed 9 years ago
Not really a bug, -
is to denote a short option and --
is for long options.
FCLP supports combined short options, so if you input -pT
it will be parsed as two seperate short options, -p
and -T
.
So with -engine
, FCLP thinks you are combining short options and interprets it as -e -n -g -i -n -e
. Because in the first setup you've only specified a long option it does not find a match. However in your second setup you specify the short option e
which it matches.
Make sense?
If you specified --engine="c:\engine.txt"
it would parse as expected because you're correctly denoting a long option.
Please add this to examples of use - the examples don't show how to use a long option
On 1 September 2014 14:32, Siy Williams notifications@github.com wrote:
Not really a bug, - is to denote a short option and -- is for long options.
FCLP supports combined short options, so if you input -pT it will be parsed as two seperate short options, -p and -T.
So with -engine, FCLP thinks you are combining short options and interprets it as -e -n -g -i -n -e. Because in the first setup you've only specified a long option it does not find a match. However in your second setup you specify the short option e which it matches.
Make sense?
If you specified --engine="c:\engine.txt" it would parse as expected because you're correctly denoting a long option.
— Reply to this email directly or view it on GitHub https://github.com/fclp/fluent-command-line-parser/issues/24#issuecomment-54059199 .
Bryan Crotaz Managing Director Silver Curve
That's what I intended with the --silient
long option in the example, but I can see why it might not be clear because it doesn't show assigning a long option a value.
I will update the example to make it clearer.
Fails to find option -engine="c:\engine.txt":
Finds option -engine="c:\engine.txt":