'exec-plus)
((and
(grep-probe find-program `(nil nil nil ,null-device "-print0"))
- (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo")))
+ (grep-probe xargs-program `(nil nil nil "-0" "echo")))
'gnu)
(t
'exec))))
;; Windows shells need the program file name
;; after the pipe symbol be quoted if they use
;; forward slashes as directory separators.
- (format "%s . -type f -print0 | \"%s\" -0 -e %s"
+ (format "%s . -type f -print0 | \"%s\" -0 %s"
find-program xargs-program grep-command))
((memq grep-find-use-xargs '(exec exec-plus))
(let ((cmd0 (format "%s . -type f -exec %s"
(format "%s " null-device)
"")))
(cond ((eq grep-find-use-xargs 'gnu)
- (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s"
+ (format "%s . <X> -type f <F> -print0 | \"%s\" -0 %s"
find-program xargs-program gcmd))
((eq grep-find-use-xargs 'exec)
(format "%s . <X> -type f <F> -exec %s {} %s%s"
(compilation-start regexp 'grep-mode))
(setq dir (file-name-as-directory (expand-file-name dir)))
(require 'find-dired) ; for `find-name-arg'
+ ;; In Tramp, there could be problems if the command line is too
+ ;; long. We escape it, therefore.
(let ((command (grep-expand-template
grep-find-template
regexp
(concat (shell-quote-argument "(")
" " find-name-arg " "
- (mapconcat #'shell-quote-argument
- (split-string files)
- (concat " -o " find-name-arg " "))
+ (mapconcat
+ #'shell-quote-argument
+ (split-string files)
+ (concat "\\\n" " -o " find-name-arg " "))
" "
(shell-quote-argument ")"))
dir
(concat "*/"
(cdr ignore)))))))
grep-find-ignored-directories
- " -o -path ")
+ "\\\n -o -path ")
" "
(shell-quote-argument ")")
" -prune -o "))
(shell-quote-argument
(cdr ignore))))))
grep-find-ignored-files
- " -o -name ")
+ "\\\n -o -name ")
" "
(shell-quote-argument ")")
" -prune -o "))))))