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

One nitpick:

Note that there is a conflict between the subcommands in the example:

    naval_fate ship new <name>...
    naval_fate ship <name> move <x> <y> [--speed=<kn>]
    naval_fate ship shoot <x> <y>
Users can't name their ships 'new' or 'shoot' and you can't safely add more 'ship something' commands in new versions as you risk colliding with some user's ship name.

You could try to warn of such conflicts, but that sounds like a lot of work... :)



You can just change the second line to:

    naval_fate ship move <name> <x> <y> [--speed=<kn>]
to eliminate all the problems you named. Those problems are about specific interface, not docopt.


As I said I was nitpicking. :)




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

Search: