branch: elpa/aidermacs
commit 462c2dc6613bcf4fe4ce039a3eae7b01387000fe
Author: Mingde (Matthew) Zeng <matthew...@posteo.net>
Commit: Mingde (Matthew) Zeng <matthew...@posteo.net>

    Use shell-quote-argument
    
    Addresses #88
    
    Signed-off-by: Mingde (Matthew) Zeng <matthew...@posteo.net>
---
 aidermacs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aidermacs.el b/aidermacs.el
index 2db15829e6..ec264bf428 100644
--- a/aidermacs.el
+++ b/aidermacs.el
@@ -680,7 +680,7 @@ Otherwise, return FILE unchanged."
   "Prepare FILES for use with COMMAND in aider.
 Handles TRAMP paths by extracting local parts and formats the command string."
   (let* ((localized-files (mapcar #'aidermacs--localize-tramp-path (delq nil 
files)))
-         (quoted-files (mapcar (lambda (path) (format "\"%s\"" path)) 
localized-files)))
+         (quoted-files (mapcar #'shell-quote-argument localized-files)))
     (if quoted-files
         (format "%s %s" command
                 (mapconcat #'identity quoted-files " "))

Reply via email to