We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Assume the very simple example:
import DocOpt doc = """ Usage: test_docopt_order.jl -a <arg_a> -b <arg_b> Options: -a <arg_a> Argument A. -b <arg_b> Argument B. """ args = DocOpt.docopt(doc) @show args
Calling the script with the proposed order works fine:
$ julia docopt_test.jl -a aaaa -b bbbb args = Dict{String,Any}("-a" => true,"<arg_a>" => "aaaa","-b" => true,"<arg_b>" => "bbbb")
i.e., -a gives us "<arg_a>" => "aaaa" and -b gives us "<arg_b>" => "bbbb".
-a
"<arg_a>" => "aaaa"
-b
"<arg_b>" => "bbbb"
Now, if we invert the order, things get messy:
$ julia docopt_test.jl -b bbbb -a aaaa args = Dict{String,Any}("-a" => true,"<arg_a>" => "bbbb","-b" => true,"<arg_b>" => "aaaa")
Note that docopt parse <arg_a> as "bbbb" and <arg_b> as "aaaa".
<arg_a>
"bbbb"
<arg_b>
"aaaa"
In other words, it looks like docopt only consider positional arguments.
Julia Version 1.4.0 (2020-03-21) "DocOpt" => v"0.4.0"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Assume the very simple example:
Calling the script with the proposed order works fine:
i.e.,
-a
gives us"<arg_a>" => "aaaa"
and-b
gives us"<arg_b>" => "bbbb"
.Now, if we invert the order, things get messy:
Note that docopt parse
<arg_a>
as"bbbb"
and<arg_b>
as"aaaa"
.In other words, it looks like docopt only consider positional arguments.
Julia Version 1.4.0 (2020-03-21)
"DocOpt" => v"0.4.0"
The text was updated successfully, but these errors were encountered: