From 99c3a1ec7fc7b6830ffb75470c2c13133077ee91 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 2 Oct 2024 10:55:59 -0700 Subject: [PATCH] feat: Rename `--yes` to `--yes-always` and update config file syntax --- HISTORY.md | 7 ++++++ aider/args_formatter.py | 5 +++- aider/website/HISTORY.md | 7 ++++++ aider/website/assets/sample.aider.conf.yml | 17 ++++++++++--- aider/website/assets/sample.env | 2 +- aider/website/docs/config/aider_conf.md | 29 +++++++++++++++++----- aider/website/docs/config/dotenv.md | 2 +- aider/website/docs/config/options.md | 11 ++++---- 8 files changed, 62 insertions(+), 18 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index ee66714ed..0f580946f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,13 @@ # Release history +### main branch + +- Renamed `--yes` to `--yes-always`. + - Now uses `AIDER_YES_ALWAYS` env var and `yes-always:` yaml key. + - Can still abbreviate to `--yes` on the command line. +- Config file now uses standard YAML list syntax with ` - list entries`, one per line. + ### Aider v0.58.1 - Fixed bug where cache warming pings caused subsequent user messages to trigger a tight loop of LLM requests. diff --git a/aider/args_formatter.py b/aider/args_formatter.py index 1412ea53e..5b458fec2 100644 --- a/aider/args_formatter.py +++ b/aider/args_formatter.py @@ -147,7 +147,10 @@ class YamlHelpFormatter(argparse.HelpFormatter): elif action.nargs in ("*", "+") or isinstance(action, argparse._AppendAction): parts.append(f"#{switch}: xxx") parts.append("## Specify multiple values like this:") - parts.append(f"#{switch}: [xxx,yyyy,zzz]\n") + parts.append(f"#{switch}:") + parts.append(f"# - xxx") + parts.append(f"# - yyy") + parts.append(f"# - zzz") else: parts.append(f"#{switch}: xxx\n") diff --git a/aider/website/HISTORY.md b/aider/website/HISTORY.md index 356fd87f8..86d1e81a3 100644 --- a/aider/website/HISTORY.md +++ b/aider/website/HISTORY.md @@ -16,6 +16,13 @@ cog.out(text) # Release history +### main branch + +- Renamed `--yes` to `--yes-always`. + - Now uses `AIDER_YES_ALWAYS` env var and `yes-always:` yaml key. + - Can still abbreviate to `--yes` on the command line. +- Config file now uses standard YAML list syntax with ` - list entries`, one per line. + ### Aider v0.58.1 - Fixed bug where cache warming pings caused subsequent user messages to trigger a tight loop of LLM requests. diff --git a/aider/website/assets/sample.aider.conf.yml b/aider/website/assets/sample.aider.conf.yml index 84082ee7e..71e6b83f5 100644 --- a/aider/website/assets/sample.aider.conf.yml +++ b/aider/website/assets/sample.aider.conf.yml @@ -248,7 +248,10 @@ ## Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times) #lint-cmd: xxx ## Specify multiple values like this: -#lint-cmd: [xxx,yyyy,zzz] +#lint-cmd: +# - xxx +# - yyy +# - zzz ## Enable/disable automatic linting after changes (default: True) #auto-lint: true @@ -268,12 +271,18 @@ ## specify a file to edit (can be used multiple times) #file: xxx ## Specify multiple values like this: -#file: [xxx,yyyy,zzz] +#file: +# - xxx +# - yyy +# - zzz ## specify a read-only file (can be used multiple times) #read: xxx ## Specify multiple values like this: -#read: [xxx,yyyy,zzz] +#read: +# - xxx +# - yyy +# - zzz ## Use VI editing mode in the terminal (default: False) #vim: false @@ -300,7 +309,7 @@ #apply: xxx ## Always say yes to every confirmation -#yes: false +#yes-always: false ## Enable verbose output #verbose: false diff --git a/aider/website/assets/sample.env b/aider/website/assets/sample.env index 57fc757d1..f96fd9964 100644 --- a/aider/website/assets/sample.env +++ b/aider/website/assets/sample.env @@ -295,7 +295,7 @@ #AIDER_APPLY= ## Always say yes to every confirmation -#AIDER_YES= +#AIDER_YES_ALWAYS= ## Enable verbose output #AIDER_VERBOSE=false diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index ceedb5d99..69296b495 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -23,8 +23,16 @@ load whichever is found first. ## A note on lists -The syntax for specifying a list of values is not standard yaml. -Instead, use this format: +Lists of values can be specified either as a bulleted list: + +``` +read: + - CONVENTIONS.md + - anotherfile.txt + - thirdfile.py +``` + +Or lists can be specified using commas and square brackets: ``` read: [CONVENTIONS.md, anotherfile.txt, thirdfile.py] @@ -296,7 +304,10 @@ cog.outl("```") ## Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times) #lint-cmd: xxx ## Specify multiple values like this: -#lint-cmd: [xxx,yyyy,zzz] +#lint-cmd: +# - xxx +# - yyy +# - zzz ## Enable/disable automatic linting after changes (default: True) #auto-lint: true @@ -316,12 +327,18 @@ cog.outl("```") ## specify a file to edit (can be used multiple times) #file: xxx ## Specify multiple values like this: -#file: [xxx,yyyy,zzz] +#file: +# - xxx +# - yyy +# - zzz ## specify a read-only file (can be used multiple times) #read: xxx ## Specify multiple values like this: -#read: [xxx,yyyy,zzz] +#read: +# - xxx +# - yyy +# - zzz ## Use VI editing mode in the terminal (default: False) #vim: false @@ -348,7 +365,7 @@ cog.outl("```") #apply: xxx ## Always say yes to every confirmation -#yes: false +#yes-always: false ## Enable verbose output #verbose: false diff --git a/aider/website/docs/config/dotenv.md b/aider/website/docs/config/dotenv.md index 76a313c78..03e865991 100644 --- a/aider/website/docs/config/dotenv.md +++ b/aider/website/docs/config/dotenv.md @@ -337,7 +337,7 @@ cog.outl("```") #AIDER_APPLY= ## Always say yes to every confirmation -#AIDER_YES= +#AIDER_YES_ALWAYS= ## Enable verbose output #AIDER_VERBOSE=false diff --git a/aider/website/docs/config/options.md b/aider/website/docs/config/options.md index d0fce88c6..afa0b6c85 100644 --- a/aider/website/docs/config/options.md +++ b/aider/website/docs/config/options.md @@ -65,9 +65,10 @@ usage: aider [-h] [--openai-api-key] [--anthropic-api-key] [--model] [--read] [--vim] [--chat-language] [--version] [--just-check-update] [--check-update | --no-check-update] - [--install-main-branch] [--upgrade] [--apply] [--yes] - [-v] [--show-repo-map] [--show-prompts] [--exit] - [--message] [--message-file] [--encoding] [-c] [--gui] + [--install-main-branch] [--upgrade] [--apply] + [--yes-always] [-v] [--show-repo-map] [--show-prompts] + [--exit] [--message] [--message-file] [--encoding] [-c] + [--gui] [--suggest-shell-commands | --no-suggest-shell-commands] [--voice-format] [--voice-language] @@ -551,9 +552,9 @@ Aliases: Apply the changes from the given file instead of running the chat (debug) Environment variable: `AIDER_APPLY` -### `--yes` +### `--yes-always` Always say yes to every confirmation -Environment variable: `AIDER_YES` +Environment variable: `AIDER_YES_ALWAYS` ### `--verbose` Enable verbose output