From: Jim Porter <jporterbugs@gmail.com>
To: 56227@debbugs.gnu.org
Subject: bug#56227: 29.0.50; Eshell globs ending with '/' should match directories only
Date: Sat, 25 Jun 2022 18:45:35 -0700 [thread overview]
Message-ID: <59d27492-84bb-02d1-0c10-55b8e861aeb7@gmail.com> (raw)
In regular shells, the pattern '*' matches any (non-dot) file, whereas
'*/' only matches directories:
$ echo *
admin args config.log config.status doc etc leim lib lib-src lisp
lwlib Makefile nextstep nt oldXMenu src test
$ echo */
admin/ doc/ etc/ leim/ lib/ lib-src/ lisp/ lwlib/ nextstep/ nt/
oldXMenu/ src/ test/
However, in Eshell, both of these do the same thing:
~ $ echo *
("Makefile" "admin/" "args" "config.log" "config.status" "doc/" "etc/"
"leim/" "lib-src/" "lib/" "lisp/" "lwlib/" "nextstep/" "nt/"
"oldXMenu/" "src/" "test/")
~ $ echo */
("Makefile" "admin/" "args" "config.log" "config.status" "doc/" "etc/"
"leim/" "lib-src/" "lib/" "lisp/" "lwlib/" "nextstep/" "nt/"
"oldXMenu/" "src/" "test/")
For consistency with other shells, and to make Eshell's globbing more
expressive, I think we should make the latter match directories only.
While this technically changes an existing behavior, it should be a safe
change to make, since there's currently no reason I'm aware of to add a
trailing slash to an Eshell glob.
Patch forthcoming; just getting a bug number...
next reply other threads:[~2022-06-26 1:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-26 1:45 Jim Porter [this message]
2022-06-26 1:52 ` bug#56227: 29.0.50; Eshell globs ending with '/' should match directories only Jim Porter
2022-06-26 14:52 ` Lars Ingebrigtsen
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=59d27492-84bb-02d1-0c10-55b8e861aeb7@gmail.com \
--to=jporterbugs@gmail.com \
--cc=56227@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).