From: Dan Jacobson <jidanni@jidanni.org>
To: 71078@debbugs.gnu.org
Subject: bug#71078: rgrep accepts wildcard, then throws it away
Date: Mon, 20 May 2024 19:48:53 +0800 [thread overview]
Message-ID: <877cfowvoa.5.fsf@jidanni.org> (raw)
When rgrep asks for the Base directory, and the user gives a wildcard,
Base directory: /usr/share/doc/exim4*
it is thrown away, and this instead gets run:
(rgrep "minimaldns" "* .*" "/usr/share/doc/exim4")
In fact this is a very special case, as there happens to be a directory
with just that name,
/usr/share/doc:
wildcard exim4*
drwxr-xr-x 2 4096 04-13 07:09 exim4-daemon-light
drwxr-xr-x 3 4096 04-13 07:09 exim4-base
drwxr-xr-x 3 4096 04-13 07:09 exim4-config
drwxr-xr-x 2 4096 2023-11-07 exim4-doc-info
drwxr-xr-x 3 4096 2023-11-07 exim4-doc-html
lrwxrwxrwx 1 10 2016-12-08 exim4 -> exim4-base
Normally rgrep won't let the user even proceed if e.g., the user just gave
Base directory: /usr/share/doc/exi*
but in the case where there is in fact a directory that matches exim4,
the "*" gets thrown away!
In fact if we do add the * here,
(rgrep "minimaldns" "* .*" "/usr/share/doc/exim4*")
and do ^X^E, we end up searching ~/ !
emacs-version "29.3"
next reply other threads:[~2024-05-20 11:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 11:48 Dan Jacobson [this message]
2024-05-20 17:26 ` bug#71078: rgrep accepts wildcard, then throws it away Stefan Kangas
2024-05-21 15:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cfowvoa.5.fsf@jidanni.org \
--to=jidanni@jidanni.org \
--cc=71078@debbugs.gnu.org \
/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.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).