Small changes

This commit is contained in:
2025-11-04 16:41:52 +00:00
parent fe0c756636
commit d46304378c
6 changed files with 11 additions and 41 deletions

View File

@@ -47,7 +47,9 @@ Returns a list of files with the directory preprended to them."
(defun +search/find-file ()
(interactive)
(find-file (completing-read "Find file: " (+search/get-all-candidates) nil t)))
(let* ((cands (+search/get-all-candidates))
(choice (completing-read "Find file: " cands nil t)))
(find-file choice)))
(defun +search/-format-grep-candidates ()
(thread-last (+search/get-all-candidates)
@@ -57,7 +59,7 @@ Returns a list of files with the directory preprended to them."
(defun +search/search-all ()
(interactive)
(let ((term (read-string "Search for: " (thing-at-point 'symbol)))
(let ((term (read-string "Search for: "))
(candidates (+search/-format-grep-candidates)))
(thread-last candidates
(format "grep --color=auto -nIHZe \"%s\" -- %s" term)