Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

About long options repeated: you can either specify "[options]" shortcut in a pattern in order not to put all options in that pattern, or you can have all options listed in the pattern--then you can avoid having them in option description.

About repeating program's name (say "naval_fate"), you can do:

    """Usage: prog <bla> ...
              prog <bla> --bla
    """
    args = docopt(__doc__.replace('prog', 'naval_fate'))


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: