This call asks you to provide a command table. This table can include args and positional_args with the args being key/value pairs. This can be seen here in the docs near the bottom:
Thank you for reporting this, @blueyetisoftware
Does the behavior you described happen for all the capabilities that receive an argument in the command?
I read that as saying that capability commands have positional arguments, but as the capability definition also includes a name for each argument they add that in for you because they are nice like that.
From what I can see from the code, it looks like args starts off as the positional arguments and gets renamed to positional_args, and then args is generated for you. So I think you are confusing things by giving it the intended end product.
You can see the code in st/capabilities/init.lua - there is a function to validate and normalize the command.
In summary, if you just do args = { my_arg_value } I rather suspect it will all come out in the wash.
Thanks @nayelyz . How does it decide what name to give the 50 when it ends up in args? Is it based on the order the args are added to the capability when it is defined?
Based on the code, yes, the arg definition (name, schema, etc.) is gotten when the validator goes through the elements in “args”.
Are you using a capability with a command with more than one argument?
I checked with the colorControl capability and the setColor command which receives a COLOR_MAP argument and there I defined the internal names, for example: