diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2014-08-22 09:12:50 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2014-08-22 09:12:50 +0200 |
commit | 20c9ccbd900119173885a0d29752c339fead97ce (patch) | |
tree | 8d4d79a2d6d70f7b1ba1d0150edaad3b42789220 /docs/commands.rst | |
parent | 5fc29baf75897d594fe06ba085955d8068e22554 (diff) | |
download | click-20c9ccbd900119173885a0d29752c339fead97ce.tar.gz |
Fixed a doc example.
Diffstat (limited to 'docs/commands.rst')
-rw-r--r-- | docs/commands.rst | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/docs/commands.rst b/docs/commands.rst index 1b59e6a..e79dca7 100644 --- a/docs/commands.rst +++ b/docs/commands.rst @@ -168,13 +168,12 @@ Example: def sync(): click.echo('The subcommand') -And how it works in practice:: +And how it works in practice: - $ python tool.py - I was invoked without subcommand - $ python tool.py sync - I am about to invoke sync - The subcommand +.. click:run:: + + invoke(cli, prog_name='tool', args=[]) + invoke(cli, prog_name='tool', args=['sync']) .. _custom-multi-commands: |