Jaymon/captain

Inferring non-named args when they aren't explicitly defined using @arg

Jaymon opened this issue · 0 comments

This failed:

class Foo(Command):
    def handle(self, bar):
        self.output.out(bar)

when running this command:

$ python filename.py foo "bar value"

I bet it would've worked if I did this:

$ python filename.py foo --bar "bar value"

It Did work as expected when I added the @arg:

class Foo(Command):
    @arg("bar")
    def handle(self, bar):
        self.output.out(bar)

I'm wondering if there is a way to make the inference engine work for non-named arguments