Looking through the docopt documentation and examples I can't seem to find this functionality, but I feel as it should exist so I thought I'd ask to make sure.
I'm using docopt for Python and want to be able to allow arbitrary options. The use case is a command line templating utility - so arbitrary key values would be handy.
"""Templator
Usage:
templator <template> [--arbitrary-option=<value>]...
"""
Hope that example demonstratives what I'm after. Maybe something like --*=<value>
would be an alternative way of writing it.
EDIT:
Here's my current solution which takes key values pairs. However, these are seperated by spaces so could be hard to figure out what are keys and values for long statements.
templator <template> (<key> <value>)...
Then in the python script (for anyone interested in this solution)
arguments = docopt(__doc_)
arbitrary_kwargs = dict(zip(arguments['<key>'], arguments['<value>']))
Having key=value
syntax would be ideal - if that's possible.