emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix `grep' command to handle filenames starting with '-'.
@ 2024-11-07  9:24 Xi Lu
  2024-11-07 10:40 ` Rens Oliemans
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Xi Lu @ 2024-11-07  9:24 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Xi Lu

* lisp/org-mouse.el (org-mouse-context-menu): Fix `grep' command to
handle filenames starting with '-' by adjusting wildcard usage to
prevent misinterpretation as options.
---
 lisp/org-mouse.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el
index 322d98682..7f85653f2 100644
--- a/lisp/org-mouse.el
+++ b/lisp/org-mouse.el
@@ -627,7 +627,7 @@ This means, between the beginning of line and the point."
 	   ["Sparse Tree" (org-occur ',region-string)]
 	   ["Find in Buffer" (occur ',region-string)]
 	   ["Grep in Current Dir"
-	    (grep (format "grep -rnH -e '%s' *" ',region-string))]
+	    (grep (format "grep -rnH -e '%s' ./*" ',region-string))]
 	   ["Grep in Parent Dir"
 	    (grep (format "grep -rnH -e '%s' ../*" ',region-string))]
 	   "--"
-- 
2.45.2




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-09 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07  9:24 [PATCH] Fix `grep' command to handle filenames starting with '-' Xi Lu
2024-11-07 10:40 ` Rens Oliemans
2024-11-07 10:44   ` lux
2024-11-08  3:46 ` Max Nikulin
2024-11-08  3:56   ` lux
2024-11-09 14:35 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).