mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
Add environment variable information to argparse help text.
This commit is contained in:
parent
289ab516e9
commit
3c210286ba
1 changed files with 7 additions and 0 deletions
|
@ -48,6 +48,13 @@ class DotEnvFormatter(argparse.HelpFormatter):
|
|||
if action.help:
|
||||
parts.append(f"## {action.help}")
|
||||
|
||||
if action.env_var:
|
||||
env_var = action.env_var
|
||||
if default:
|
||||
parts.append(f"{env_var}={default}\n")
|
||||
else:
|
||||
parts.append(f"{env_var}=\n")
|
||||
|
||||
for switch in action.option_strings:
|
||||
if switch.startswith("--"):
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue