deis/deis — pull request #2756 by mboersma (2014-12-16 01:43:45+00:00)
Title: fix(deisctl): parse global and command-specific options correctly

In testing @carmstrong noticed that `deisctl refresh-units --path=/foo` was broken, which apparently happened in #2401, but no command other than `refresh-units` takes options currently, and since we don't yet have unit tests :japanese_ogre: (see #2418) for this it wasn't noticed.

Having `docopt` parse the global options first with the `optionsFirst` flag as `true`, then letting subcommands handle their `--` options, is [the way to go](https://github.com/docopt/docopt#subparsers-multi-level-help-and-huge-applications-like-git) generally with `docopt`, and does fix the issue while honoring the global options such as `--tunnel=` and `--ssh-timeout=`.