branch: elpa/aidermacs
commit c57f083466364e247da84783ea60eea540dcb1c2
Author: Kang Tu <[email protected]>
Commit: Kang Tu (aider) <[email protected]>
feat: add interactive function to run find-name-dired from Git repository
root
---
aider.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/aider.el b/aider.el
index 3c809c5731..25b3037662 100644
--- a/aider.el
+++ b/aider.el
@@ -246,6 +246,16 @@ The command will be formatted as \"/architect \" followed
by the user command an
(let ((line (thing-at-point 'line t)))
(aider--send-command (concat "/ask " (string-trim line)))))
+;; New function to run `find-name-dired` from the Git repository root directory
+(defun aider-repo-find-name-dired (pattern)
+ "Run `find-name-dired` from the Git repository root directory with the given
PATTERN."
+ (interactive "sFind name (pattern): ")
+ (let* ((git-repo-path (shell-command-to-string "git rev-parse
--show-toplevel"))
+ (repo-path (string-trim git-repo-path)))
+ (if (string-match-p "fatal" repo-path)
+ (message "Not in a git repository")
+ (find-name-dired repo-path pattern))))
+
;;; functions for dired related
;; New function to add multiple Dired marked files to Aider buffer