Skip to content

Commit efcdb42

Browse files
committed
feat(cli): allow_interspersed_args
This lets you place root-level log stuff in subcommands, e.g. --log-level See also: https://click.palletsprojects.com/en/8.1.x/api/#click.BaseCommand.allow_interspersed_args
1 parent 46a0550 commit efcdb42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vcspull/cli/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
log = logging.getLogger(__name__)
1818

1919

20-
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
20+
@click.group(
21+
context_settings={
22+
"help_option_names": ["-h", "--help"],
23+
"allow_interspersed_args": True,
24+
}
25+
)
2126
@click.option(
2227
"--log-level",
2328
default="INFO",

0 commit comments

Comments
 (0)