OptionKit
OptionKit copied to clipboard
Better docs and examples
Hello, I like the concept of your project and would like to use it a bit more. It's fine if I have one option but it seems to break on multiple options.
(e.g. myApp -e Hello -a AnotherValue)
Result: opt1: rest = ["Hello", "AnotherValue"]
Expected: rest = "Hello"
opt3: rest = ["Hello", "AnotherValue"]
Expected: rest = "AnotherValue"
Hi @cheizer! I just had the same problem... the rest has no relation to which argument it belonged to, it's just all argument values combined :/
I think the input should come as the value of the options array. That way one could query it like
if let option1Argument = options[option1] {
// use specific information
}