aider/aider
Alexander Kjeldaas 67c5bb5985 aider: Remove the use of shlex.split(args) in cmd_run method.
# Aider chat conversation:

USER: what does shlex.split(args) do?

ASSISTANT: The `shlex.split(args)` function is a method in Python's `shlex` module. It splits the string `args` into a list of substrings, using shell-like syntax. This means it handles quotes and backslashes like a Unix shell would.

For example, if `args` is a string like `"command -option 'argument with spaces'"`, `shlex.split(args)` would return the list `['command', '-option', 'argument with spaces']`.

This is useful when you want to pass a command line command as a string to a function like `subprocess.run()`, which expects a list of arguments.

USER: remove the use of shlex in cmd_run

ASSISTANT: To remove the use of `shlex.split(args)` in the `cmd_run` method, we need to modify the `aider/commands.py` file. Here's the change:

<source>python
aider/commands.py
<<<<<<< HEAD
            parsed_args = shlex.split(args)
            result = subprocess.run(
                parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, shell=True
            )
=======
            result = subprocess.run(
                args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, shell=True
            )
>>>>>>> updated
</source>
2023-10-01 19:51:38 +02:00
..
coders Show supported models when avail check fails 2023-09-29 09:20:36 -07:00
models Added __all__ to models/__init__ 2023-09-08 08:28:12 -07:00
__init__.py set version to 0.14.2-dev 2023-09-29 17:21:19 -07:00
commands.py aider: Remove the use of shlex.split(args) in cmd_run method. 2023-10-01 19:51:38 +02:00
diffs.py use utf-8 2023-07-05 20:51:35 -07:00
dump.py isort 2023-05-28 22:47:38 -07:00
history.py Merge remote-tracking branch 'origin/main' 2023-09-08 08:26:23 -07:00
io.py pass the input history as a prompt to whisper 2023-08-11 11:03:37 -03:00
main.py print warning if cur wd is different than git wd, per discussion in #188 2023-09-29 13:10:06 -07:00
prompts.py Add summary prefix 2023-07-22 12:11:01 -03:00
repo.py don't try and commit unless there are changes #264 2023-09-25 14:55:00 -07:00
repomap.py finishing openrouter integration 2023-08-23 21:26:27 +12:00
sendchat.py lint 2023-09-01 15:53:19 -07:00
utils.py Adopt safe_abs_path 2023-07-07 17:17:33 -07:00
versioncheck.py cleanup 2023-07-20 09:49:40 -03:00
voice.py Late-bind importing sounddevice, as it was slowing down aider startup 2023-08-19 15:18:46 -07:00