Skip to content

Commit 5ca2742

Browse files
lahwaaczWhyNotHugo
authored andcommitted
Add short option for the help option
1 parent 5ac9dce commit 5ca2742

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vdirsyncer/cli/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
cli_logger = logging.getLogger(__name__)
1717
click_log.basic_config("vdirsyncer")
1818

19+
# add short option for the help option
20+
click_context_settings = dict(help_option_names=['-h', '--help'])
21+
1922

2023
class AppContext:
2124
def __init__(self):
@@ -41,7 +44,7 @@ def inner(*a, **kw):
4144
return inner
4245

4346

44-
@click.group()
47+
@click.group(context_settings=click_context_settings)
4548
@click_log.simple_verbosity_option("vdirsyncer")
4649
@click.version_option(version=__version__)
4750
@click.option("--config", "-c", metavar="FILE", help="Config file to use.")

0 commit comments

Comments
 (0)