Skip to content

how do i auto-print help when no args are provided? #26

@sg-s

Description

@sg-s

hello! i love arguably! i have this simple example:

import arguably

@arguably.command
def foo__bar1():
    """some help text"""
    print("foo__bar1")


@arguably.command
def foo__bar2():
    """some help text"""
    print("foo__bar2")

def main():
    arguably.run()

assuming the name of the script is cli, when i do:

cli foo -h

i get a nice help message for the sub commands. however, when i do

cli foo

i get this error:

usage: cli foo [-h] command ...
cli foo: error: the following arguments are required: command

can i configure arguably to always print help when no args/commands are supplied? (this is similar to how cement works)

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