Added short "-h" help option for PlatformIO and sub-commands

This commit is contained in:
Ivan Kravets
2015-09-02 23:07:45 +03:00
parent baa83c6ee6
commit 25c448627e
3 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,7 @@ PlatformIO 2.0
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__ `atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
platform platform
(`pull #256 <https://github.com/platformio/platformio/pull/256>`_) (`pull #256 <https://github.com/platformio/platformio/pull/256>`_)
* Added short ``-h`` help option for PlatformIO and sub-commands
* Updated ``tool-teensy`` for `Teensy <http://docs.platformio.org/en/latest/platforms/teensy.html>`__ * Updated ``tool-teensy`` for `Teensy <http://docs.platformio.org/en/latest/platforms/teensy.html>`__
platform platform
(`issue #268 <https://github.com/platformio/platformio/issues/268>`_) (`issue #268 <https://github.com/platformio/platformio/issues/268>`_)

View File

@ -18,7 +18,7 @@ Options
.. program:: platformio .. program:: platformio
.. option:: .. option::
--force, - f --force, -f
Force to accept any confirmation prompts. This option allows to avoid an issue Force to accept any confirmation prompts. This option allows to avoid an issue
with :ref:`faq_troubleshooting_pioblocksprompt` with :ref:`faq_troubleshooting_pioblocksprompt`
@ -29,7 +29,7 @@ with :ref:`faq_troubleshooting_pioblocksprompt`
Show the version of PlatformIO Show the version of PlatformIO
.. option:: .. option::
--help --help, -h
Show help for the available options and commands Show help for the available options and commands

View File

@ -51,7 +51,8 @@ class PlatformioCLI(click.MultiCommand): # pylint: disable=R0904
raise AttributeError() raise AttributeError()
@click.command(cls=PlatformioCLI) @click.command(cls=PlatformioCLI,
context_settings=dict(help_option_names=["-h", "--help"]))
@click.version_option(__version__, prog_name="PlatformIO") @click.version_option(__version__, prog_name="PlatformIO")
@click.option("--force", "-f", is_flag=True, @click.option("--force", "-f", is_flag=True,
help="Force to accept any confirmation prompts") help="Force to accept any confirmation prompts")