On 6/25/2022 6:45 PM, Jim Porter wrote: > 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. Here's the patch. The first part refactors em-glob.el a bit, and converts globs into regexps ahead of time. This is partly to make the second patch simpler, but also improves performance by a few percent when `eshell-glob-entries' examines many directories: it no longer repeatedly converts the same glob component for each sibling directory. The second part is the actual patch for this bug.