[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep-tree doesn't shell-quote-argument
From: |
Magnus Henoch |
Subject: |
grep-tree doesn't shell-quote-argument |
Date: |
Mon, 17 Apr 2006 23:17:14 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (berkeley-unix) |
grep-tree doesn't quote its regexp argument to protect it from the
shell. This makes it harder to use * and ? in regexps. I propose
this patch:
2006-04-17 Magnus Henoch <address@hidden>
* progmodes/grep.el (grep-tree): Call shell-quote-argument on
regexp.
*** orig/lisp/progmodes/grep.el
--- mod/lisp/progmodes/grep.el
***************
*** 631,637 ****
(setq files (cdr mf)))))
(let ((command-args (grep-expand-command-macros
grep-tree-command
! (setq grep-tree-last-regexp regexp)
(and files (concat "-name '" files "'"))
(if subdirs
(if (stringp subdirs)
--- 632,638 ----
(setq files (cdr mf)))))
(let ((command-args (grep-expand-command-macros
grep-tree-command
! (shell-quote-argument (setq grep-tree-last-regexp
regexp))
(and files (concat "-name '" files "'"))
(if subdirs
(if (stringp subdirs)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep-tree doesn't shell-quote-argument,
Magnus Henoch <=