Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Keyword arguments in commands #46

Closed
jimmycuadra opened this issue Apr 11, 2014 · 1 comment
Closed

Keyword arguments in commands #46

jimmycuadra opened this issue Apr 11, 2014 · 1 comment

Comments

@jimmycuadra
Copy link
Collaborator

For more complex commands, it would be useful to be able to include keyword arguments as part of the message so that order doesn't matter and parts of the commands can be optional.

For example, a message like this:

Lita: foo bar=baz this_key="has a quote-delimited value"

Could have its keyword arguments accessed by a handler:

message.keyword_args[:bar] # "baz"
message.keyword_args[:this_key] # "has a quote-delimited value"

It might also be worth supporting different characters in place of the =, since there is precedent for this, for example in lita-datadog, which uses a : and requires that the values be quoted. /cc @esigler

@jimmycuadra
Copy link
Collaborator Author

This is now released as lita-keyword-arguments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant