Skip to content

Handling top level command #141

Description

@KidkArolis

Maybe I'm missing something, but how do I handle the top level command?

args
  .command('a', 'Import data', a)
  .command('b', 'Export data', b)

This will run a or b if I run ./cmd a or ./cmd b.

But if I run ./cmd, it's hanging (cause my script opens db connection), how do I
a) print help or
b) execute some code?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions