replace _ with - in cli options

master
Roman Hoellen 6 years ago
parent ab33ba2172
commit bc617cf8ec

@ -86,10 +86,10 @@ def user(localpart, domain_name, password, hash_scheme=None):
@mailu.command() @mailu.command()
@click.option('-n', '--domain_name') @click.option('-n', '--domain-name')
@click.option('-u', '--max_users') @click.option('-u', '--max-users')
@click.option('-a', '--max_aliases') @click.option('-a', '--max-aliases')
@click.option('-q', '--max_quota_bytes') @click.option('-q', '--max-quota-bytes')
@flask_cli.with_appcontext @flask_cli.with_appcontext
def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0): def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0):
domain = models.Domain.query.get(domain_name) domain = models.Domain.query.get(domain_name)
@ -126,7 +126,7 @@ def user_import(localpart, domain_name, password_hash, hash_scheme = None):
@mailu.command() @mailu.command()
@click.option('-v', '--verbose') @click.option('-v', '--verbose')
@click.option('-d', '--delete_objects') @click.option('-d', '--delete-objects')
@flask_cli.with_appcontext @flask_cli.with_appcontext
def config_update(verbose=False, delete_objects=False): def config_update(verbose=False, delete_objects=False):
"""sync configuration with data from YAML-formatted stdin""" """sync configuration with data from YAML-formatted stdin"""

@ -30,7 +30,8 @@ user
.. code-block:: bash .. 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 user-import
----------- -----------
@ -55,7 +56,7 @@ The sole purpose of this command is for importing users/aliases in bulk and sync
.. code-block:: bash .. 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: where mail-config.yml looks like:
@ -72,7 +73,7 @@ where mail-config.yml looks like:
domain: example.com domain: example.com
destination: "user1@example.com,user2@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 Users
----- -----

Loading…
Cancel
Save