Open pr4th4m opened 11 months ago
Nevertheless, shouldn't flag then better be a string or table of strings? Strikes me as cleaner than whitespace-separated flags.
Good point, however, flag
will have two datatypes string and table as its been used for boolean flags as well as regular (key/value) flags. I feel this might confuse user as the data type of flag
will not be consistent across boolean and regular flags. Ofcourse, we can address this in documentation but at first glance it might be confusing, your thoughts ?
ex -
["."] = {
flag = {"hidden", "no-ignore", "ignore-case"} // table allowed here
},
["&"] = {
flag = "glob", // table not allowed here
cb = function(input)
return string.format([[*{%s}*]], input)
end,
}
Will update documentation as per the call we take on above discussion.
@fdschmidt93 thoughts on above?
This PR adds support multiple boolean flags for one prefix
This is a hacky way to add support for multiple boolean flags, if you come up with a better option we can collab or if you feel this isn't the way forward we can close this PR