candy-kingdom / mints

Clean and elegant CLI development kit.
MIT License
3 stars 1 forks source link

Pass context from a parent command to its subcommand #39

Open kostiantxn opened 4 years ago

kostiantxn commented 4 years ago

Note

Right now it is impossible to pass a context from one command to another:

# candies/cli/parsers/parser.py

class Invocation:

    def __call__(self, command, context):
        if context is not None:
            raise NotImplementedError
        ...

An implementation for a case when context is not None should be added.