mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 19:55:00 +00:00
feat: add --load option to execute commands from file on launch
This commit is contained in:
parent
347a9f2a6d
commit
717592463e
2 changed files with 2 additions and 4 deletions
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
#ai add --load <fname> and call cmd_load with it in main!
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -664,7 +663,7 @@ def get_parser(default_config_files, git_root):
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--load",
|
"--load",
|
||||||
metavar="LOAD_FILE",
|
metavar="LOAD_FILE",
|
||||||
help="Load and execute commands from a file",
|
help="Load and execute /commands from a file on launch",
|
||||||
)
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--encoding",
|
"--encoding",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ai
|
# ai
|
||||||
import configparser
|
import configparser
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
@ -772,7 +772,6 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
|
|
||||||
if args.load:
|
if args.load:
|
||||||
commands.cmd_load(args.load)
|
commands.cmd_load(args.load)
|
||||||
return
|
|
||||||
|
|
||||||
if args.exit:
|
if args.exit:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue