From bc617cf8ec16ebca652b82dbb54cc7a96472451b Mon Sep 17 00:00:00 2001 From: Roman Hoellen Date: Wed, 13 Feb 2019 10:30:08 +0100 Subject: [PATCH] replace _ with - in cli options --- core/admin/mailu/manage.py | 10 +++++----- docs/cli.rst | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py index 3a8256ad..cbc8b6c9 100644 --- a/core/admin/mailu/manage.py +++ b/core/admin/mailu/manage.py @@ -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) @@ -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""" diff --git a/docs/cli.rst b/docs/cli.rst index 7328db0f..6fb2a786 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -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 ----------- @@ -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: @@ -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 -----