-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Stephen Finucane <stephen@that.guru>
- Loading branch information
1 parent
17e8a81
commit d8a73b7
Showing
4 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | ||
|
||
extensions = ['sphinx_click'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""The greet example taken from the README.""" | ||
|
||
import click | ||
|
||
|
||
@click.group() | ||
def greet(): | ||
"""A sample command group.""" | ||
pass | ||
|
||
|
||
@greet.command() | ||
@click.argument('user', envvar='USER') | ||
def hello(user): | ||
"""Greet a user.""" | ||
click.echo('Hello %s' % user) | ||
|
||
|
||
@greet.command() | ||
def world(): | ||
"""Greet the world.""" | ||
click.echo('Hello world!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Basics | ||
====== | ||
|
||
.. click:: greet:greet | ||
:prog: greet | ||
:nested: full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters