-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solve issue #501 #520
solve issue #501 #520
Conversation
b7abc5b
to
b926897
Compare
Thank you for looking into this. Indeed I do not like the idea of having a slash after |
@HennyNile Your PR is in conflict with the target branch. Can you please resolve the conflict and answer the open question? Thanks. |
@HennyNile Kindly requesting your response! |
I am very sorry for ignoring the previous messages. I will take to solve this conflict and find some better solution in the coming week. |
No need to be sorry! :-) |
@HennyNile Any news? :-) |
Hi, I am currently working on something important and will be available after July. If it's okay, I will address this issue at that time. |
@mkarg Hi, I’m currently working on this issue and will discuss it with you once I’ve found a suitable solution. |
Sounds great! :-) |
@mkarg In retrospect of this problem, I found another way to solve it and don't change the initial usage of @ syntax. While jcommander expands the @ syntax before it tries to parse the parameter values, it's hard to distinguish whether a string starting with @ is an @ syntax usage or a normal parameter value. Thus, I change to expand @ syntax during the parsing stage. If we meet a string starting with @ before we meet a parameter key, it is @ syntax usage. Otherwise, it is a normal parameter value. Hope this solution helps. |
@HennyNile Thank you very much for your contribution! 👍 😄 |
Happy to help! |
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.