diff --git a/vdirsyncer/doubleclick.py b/vdirsyncer/doubleclick.py index 47567cf..e58d946 100644 --- a/vdirsyncer/doubleclick.py +++ b/vdirsyncer/doubleclick.py @@ -87,6 +87,14 @@ ctx = _StackProxy(_ctx_stack) def _ctx_pushing_class(cls): class ContextPusher(cls): + def command(self, *args, **kwargs): + # Also wrap commands created with @group.command() + def decorator(f): + cmd = click.command(*args, **kwargs)(f) + self.add_command(cmd) + return cmd + return decorator + def invoke(self, ctx): _ctx_stack.push(ctx) try: