Skip to content

Commit

Permalink
replace _ with - in cli options
Browse files Browse the repository at this point in the history
  • Loading branch information
hoellen committed Feb 13, 2019
1 parent ab33ba2 commit bc617cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions core/admin/mailu/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def user(localpart, domain_name, password, hash_scheme=None):


@mailu.command()
@click.option('-n', '--domain_name')
@click.option('-u', '--max_users')
@click.option('-a', '--max_aliases')
@click.option('-q', '--max_quota_bytes')
@click.option('-n', '--domain-name')
@click.option('-u', '--max-users')
@click.option('-a', '--max-aliases')
@click.option('-q', '--max-quota-bytes')
@flask_cli.with_appcontext
def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0):
domain = models.Domain.query.get(domain_name)
Expand Down Expand Up @@ -126,7 +126,7 @@ def user_import(localpart, domain_name, password_hash, hash_scheme = None):

@mailu.command()
@click.option('-v', '--verbose')
@click.option('-d', '--delete_objects')
@click.option('-d', '--delete-objects')
@flask_cli.with_appcontext
def config_update(verbose=False, delete_objects=False):
"""sync configuration with data from YAML-formatted stdin"""
Expand Down
7 changes: 4 additions & 3 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ user

.. code-block:: bash
docker-compose exec admin flask mailu user --hash_scheme='SHA512-CRYPT' myuser example.net 'password123'
docker-compose exec admin flask mailu user myuser example.net 'password123'
user-import
-----------
Expand All @@ -55,7 +56,7 @@ The sole purpose of this command is for importing users/aliases in bulk and sync

.. code-block:: bash
cat mail-config.yml | docker-compose exec admin flask mailu config-update --delete_objects
cat mail-config.yml | docker-compose exec -T admin flask mailu config-update --delete-objects
where mail-config.yml looks like:

Expand All @@ -72,7 +73,7 @@ where mail-config.yml looks like:
domain: example.com
destination: "user1@example.com,user2@example.com"
without ``--delete_object`` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input.
without ``--delete-object`` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input.

Users
-----
Expand Down

0 comments on commit bc617cf

Please sign in to comment.