Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel - dbd19d0da8
Extend candidate list for custom grep-files function with history
It might be useful to actually see the history entries, so let's
explicitly include them in the candiate list.
2024-03-09 16:18:51 +01:00
Daniel - 4124bc28d5
Provide default value for custom grep-files pattern query function 2024-03-09 16:16:03 +01:00
1 changed files with 6 additions and 3 deletions

View File

@ -536,14 +536,17 @@ entries, even if I want to use the input directly."
(car grep-files-history)
(car (car grep-files-aliases))))
(files (completing-read
(format "Search for \"%s\" in files matching wildcard: "
regexp)
(format "Search for \"%s\" in files matching wildcard (default: %s): "
regexp
default)
(delete-dups
(delq nil
(append (list default default-alias default-extension)
grep-files-history
(mapcar #'car grep-files-aliases))))
nil nil nil
'grep-files-history)))
'grep-files-history
default)))
(and files
(or (cdr (assoc files grep-files-aliases))
files))))