cappa icon indicating copy to clipboard operation
cappa copied to clipboard

function-based subcommands

Open DanCardin opened this issue 1 year ago • 0 comments

Perhaps something like

@command(subcommands=[a, b])
def function():
    ...

def a():
    ...

def b():
    ...

A syntax like this is essentially forced, given the lack of a real, namable type to be able to reference in an annotation.

It doesn't really make sense from an upper level object mapping sense, but this would essentially be short for applying a subcommand directive (perhaps with has_value=False?) manually.

DanCardin avatar Nov 06 '24 01:11 DanCardin