unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#56227: 29.0.50; Eshell globs ending with '/' should match directories only
@ 2022-06-26  1:45 Jim Porter
  2022-06-26  1:52 ` Jim Porter
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Porter @ 2022-06-26  1:45 UTC (permalink / raw)
  To: 56227

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...





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

end of thread, other threads:[~2022-06-26 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-26  1:45 bug#56227: 29.0.50; Eshell globs ending with '/' should match directories only Jim Porter
2022-06-26  1:52 ` Jim Porter
2022-06-26 14:52   ` Lars Ingebrigtsen

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).