From 3443c832913b62b326c9e77515fda3c0d708b97f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 4 Jul 1997 00:11:24 +0000 Subject: [PATCH] (find-grep-dired): Use -type f. --- lisp/find-dired.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/find-dired.el b/lisp/find-dired.el index a46c6c65150..daa610af18a 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -143,8 +143,11 @@ Thus ARG can also contain additional grep options." (interactive "DFind-grep (directory): \nsFind-grep (grep regexp): ") ;; find -exec doesn't allow shell i/o redirections in the command, ;; or we could use `grep -l >/dev/null' + ;; We use -type f, not ! -type d, to avoid getting screwed + ;; by FIFOs and devices. I'm not sure what's best to do + ;; about symlinks, so as far as I know this is not wrong. (find-dired dir - (concat "! -type d -exec grep " find-grep-options " " + (concat "-type f -exec grep " find-grep-options " " args " {} \\\; "))) (defun find-dired-filter (proc string) -- 2.39.2