bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56227: 29.0.50; Eshell globs ending with '/' should match directorie


From: Jim Porter
Subject: bug#56227: 29.0.50; Eshell globs ending with '/' should match directories only
Date: Sat, 25 Jun 2022 18:45:35 -0700

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]