From: lux <lx@shellcodes.org>
To: Rens Oliemans <hallo@rensoliemans.nl>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix `grep' command to handle filenames starting with '-'.
Date: Thu, 07 Nov 2024 18:44:34 +0800 [thread overview]
Message-ID: <tencent_1B2CD6C0D700DCA5C8878537044F728ECC0A@qq.com> (raw)
In-Reply-To: <874j4j8gz2.fsf@rensoliemans.nl>
On Thu, 2024-11-07 at 11:40 +0100, Rens Oliemans wrote:
> Xi Lu <lx@shellcodes.org> writes:
>
> > - (grep (format "grep -rnH -e '%s' *" ',region-string))]
> > + (grep (format "grep -rnH -e '%s' ./*" ',region-string))]
>
> This works so my comment might be a bit too bikesheddy, but another method
> would be to
> append the argument `--` after the list of options to ensure that the rest of
> the
> arguments aren't parsed as options; perhaps that's preferred.
Yes, but I haven't tested it on other Unix-like platforms, so I'm not sure if "-
-" will work properly on all of them.
prev parent reply other threads:[~2024-11-07 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_1B2CD6C0D700DCA5C8878537044F728ECC0A@qq.com \
--to=lx@shellcodes.org \
--cc=emacs-orgmode@gnu.org \
--cc=hallo@rensoliemans.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).