mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: properly quote filenames with spaces and special characters using shlex.quote()
This commit is contained in:
parent
c4e766a4c4
commit
36bc8f90db
1 changed files with 2 additions and 3 deletions
|
@ -3,6 +3,7 @@ import re
|
|||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import shlex
|
||||
from collections import OrderedDict
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -575,9 +576,7 @@ class Commands:
|
|||
self.io.print(diff)
|
||||
|
||||
def quote_fname(self, fname):
|
||||
if " " in fname and '"' not in fname:
|
||||
fname = f'"{fname}"'
|
||||
return fname
|
||||
return shlex.quote(fname)
|
||||
|
||||
def completions_raw_read_only(self, document, complete_event):
|
||||
# Get the text before the cursor and strip leading spaces
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue