diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2014-04-25 00:42:29 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2014-04-25 00:42:29 +0200 |
commit | 18fff340f135ea8fb95bf049162d8d5b12a7d742 (patch) | |
tree | 915237a071fcb986bab74aa51918af85b07b20c6 /examples/repo | |
parent | 9d027aac4fb4229230591aeeb36778da34daa3b6 (diff) | |
download | click-18fff340f135ea8fb95bf049162d8d5b12a7d742.tar.gz |
Added support for multiple arguments.
Diffstat (limited to 'examples/repo')
-rw-r--r-- | examples/repo/repo.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/repo/repo.py b/examples/repo/repo.py index d9d8e92..7e9f0c1 100644 --- a/examples/repo/repo.py +++ b/examples/repo/repo.py @@ -70,3 +70,12 @@ def setuser(repo, username, email, password): print('Username: %s' % username) print('E-Mail: %s' % email) print('Password: %s' % ('*' * len(password))) + + +@cli.command() +@click.option('--message', '-m', required=True, multiple=True) +@pass_repo +def commit(repo, message): + """Commits outstanding changes.""" + print('Repo: %s' % repo) + print('\n'.join(message)) |