jcommander
jcommander copied to clipboard
solve issue #501
Fixes #501
Hi! #501 mentioned can not use @-syntax in conjunction with arguments starting with literal @. I solve this proplem by changing the judge rule of @-syntax. The initail version recognizes the parameter value starting with @ as a file when expandAtSign
is true whcih makes the program fail when some patameters' value just begin with @ and is not a file name. Then I add a judge rule that paramter value is not a file name when it begin with @/
. This is because filename in most OS can not begin with /
, then the parameter value begin with @/
must not be a filename.
This change bring some benefits but also add some complexity. If you want a parameter value begins with @
and not a file name like @password
, you should transfer @/@password
into.
Thank you for looking into this. Indeed I do not like the idea of having a slash after @
. Maybe we can find a solution that works without?