Closed PatrikHlobil closed 2 years ago
Dear maintainers,
I first wish to thank you for your project. I love click and the abilility to autogenerate the CLI documentation.
As you show in your documentation, sphinx-click automatically detects explicitly passed environment variables like:
@greet.command() @click.argument('user', envvar='USER') def hello(user): """Greet a user.""" click.echo('Hello %s' % user)
There is however no support for the detection of auto-generated envvars like in:
@greet.command(context_settings={"auto_envvar_prefix": "HELLO"},) @click.argument('user') def hello(user): """Greet a user.""" click.echo('Hello %s' % user)
which can use the environment variable HELLO_USER for passing the user argument.
HELLO_USER
I looked at your code, but I am not familiar enough with the internals of click and sphinx to easily see how I could add this feature.
Best Patrik
TIL. I didn't know this was a thing but the docs prove it is. This would be a near enhancement if anyone wanted to work on this. If not, I'll find time eventually.
Dear maintainers,
I first wish to thank you for your project. I love click and the abilility to autogenerate the CLI documentation.
As you show in your documentation, sphinx-click automatically detects explicitly passed environment variables like:
There is however no support for the detection of auto-generated envvars like in:
which can use the environment variable
HELLO_USER
for passing the user argument.I looked at your code, but I am not familiar enough with the internals of click and sphinx to easily see how I could add this feature.
Best Patrik