mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
aider: Added --config/-c option to specify the config file and updated the configargparse.ArgumentParser to use the YAMLConfigFileParser.
# Context: USER: add --config/-c to specify the config file ASSISTANT: To add the `--config/-c` option to specify the config file, you need to modify the `aider/main.py` file. Update the `configargparse.ArgumentParser` arguments and add a new argument for the `--config/-c` option. Here's the change: ```python aider/main.py <<<<<<< ORIGINAL parser = configargparse.ArgumentParser( description="aider - chat with GPT about your code", add_config_file_help=True, default_config_files=default_config_files, ) ======= parser = configargparse.ArgumentParser( description="aider - chat with GPT about your code", add_config_file_help=True, default_config_files=default_config_files, config_file_parser_class=configargparse.YAMLConfigFileParser, ) parser.add_argument( "-c", "--config", is_config_file=True, metavar="CONFIG_FILE", help="Specify the config file (default: search for .aider.conf.yml in git root or home directory)", ) >>>>>>> UPDATED ``` This change adds the `--config/-c` option to specify the config file and updates the `configargparse.ArgumentParser` to use the YAMLConfigFileParser for parsing the config file.
This commit is contained in:
parent
ddc97dacf8
commit
b706c36565
1 changed files with 9 additions and 0 deletions
|
@ -33,6 +33,15 @@ def main(args=None, input=None, output=None):
|
|||
description="aider - chat with GPT about your code",
|
||||
add_config_file_help=True,
|
||||
default_config_files=default_config_files,
|
||||
config_file_parser_class=configargparse.YAMLConfigFileParser,
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-c",
|
||||
"--config",
|
||||
is_config_file=True,
|
||||
metavar="CONFIG_FILE",
|
||||
help="Specify the config file (default: search for .aider.conf.yml in git root or home directory)",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue