emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/aidermacs e8c93aeee4 5/6: Fix preparing file paths contain


From: ELPA Syncer
Subject: [nongnu] elpa/aidermacs e8c93aeee4 5/6: Fix preparing file paths containing spaces
Date: Sat, 22 Mar 2025 16:01:02 -0400 (EDT)

branch: elpa/aidermacs
commit e8c93aeee4f84b94d8b1fe230a6ef20c2602d4ff
Author: ClarityStorm <45301623+claritystorm@users.noreply.github.com>
Commit: Matthew Zeng <matthewzmd@posteo.net>

    Fix preparing file paths containing spaces
---
 aidermacs.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/aidermacs.el b/aidermacs.el
index 975b6e15a3..9cac2ac379 100644
--- a/aidermacs.el
+++ b/aidermacs.el
@@ -650,10 +650,11 @@ Otherwise, return FILE unchanged."
 (defun aidermacs--prepare-file-paths-for-command (command files)
   "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))))
-    (if localized-files
+  (let* ((localized-files (mapcar #'aidermacs--localize-tramp-path (delq nil 
files)))
+         (quoted-files (mapcar (lambda (path) (format "\"%s\"" path)) 
localized-files)))
+    (if quoted-files
         (format "%s %s" command
-                (mapconcat #'identity localized-files " "))
+                (mapconcat #'identity quoted-files " "))
       (format "%s" command))))
 
 (defun aidermacs--add-files-helper (files &optional read-only message)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]