feat: add --load argument to execute commands from file

This commit is contained in:
Paul Gauthier (aider) 2024-10-29 13:53:19 -07:00
parent d288122fab
commit 347a9f2a6d
2 changed files with 9 additions and 0 deletions

View file

@ -661,6 +661,11 @@ def get_parser(default_config_files, git_root):
" (disables chat mode)"
),
)
group.add_argument(
"--load",
metavar="LOAD_FILE",
help="Load and execute commands from a file",
)
group.add_argument(
"--encoding",
default="utf-8",

View file

@ -770,6 +770,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
return 1
return
if args.load:
commands.cmd_load(args.load)
return
if args.exit:
return