Skip to content

Handle usage without specified command #53

Description

@kamurani

When implementing the various commands using @command, they are treated as necessary all the time. This works like
$ program add
or
$ program something-else
but i'd like this
$ program
to be treated as a separate command that does something other than provide the help.

I understand I can achieve this behaviour by modifying sys.argv[], but was wondering if there's an in-built way to specify a function to run when no commands are given.

Thanks for developing this tool by the way, it's excellent and i've found it really useful already!

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