techniq/flask-script — pull request #94 by smurfix (2014-03-02 18:02:10+00:00)
Title: Add capability for sub-managers to manage their own options

The first three patches in this series are mostly-obvious and hopefully self-explanatory. (I removed Flask from the test to show that flask-script does not require anything special from Flask.)

The fourth patch adds the capability for sub-managers to process their own command-line arguments. It also allows command options to have the same name as (sub)manager options, as long as the dest= values are different. It also allows a sub-manager to replace the current app with something else that's passed on to commands.

On the other hand, it takes away the ability to freely mix and match options and non-options. IMHO this was not a good idea in the first place; if nothing else, I want "manage.py --host foo config appserver --host=bar" to actually work, without being required to remember to use --config-host and --appserver-host or other strange "non-conflicting" option names. (Or in fact "-h" instead of "--host". Help is "-?" around here.) Because this is an incompatible change, this patch also increments the version number.

If you decide not to take this patch (or something like it), I'll probably maintain the change in my own fork.