GNU bug report logs - #74033
31.0.50; [PATCH] Improve accuracy of Eshell globbing syntax

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sat, 26 Oct 2024 22:09:02 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: 74033 <at> debbugs.gnu.org
Subject: bug#74033: 31.0.50; [PATCH] Improve accuracy of Eshell globbing syntax
Date: Sat, 26 Oct 2024 15:08:10 -0700
[Message part 1 (text/plain, inline)]
I've been tracking down a few issues with how Eshell parses its globs. 
For example:

  ~ $ echo **/
  # Prints all subdirectories of the current dir (good)
  ~ $ echo '**/'
  **/  # Prints the literal string (also good)
  ~ $ echo \**/
  # Prints all subdirectories (bad!)

There are a few reasons this happens but one of the things that makes 
this code more brittle is that Eshell defaults to treating characters as 
globs, and you have to opt out via an 'escape' text property. By 
inverting this logic, and proactively marking globbing characters with 
'eshell-glob-char', it now means that all the rules for determining 
which characters are globs and which are literals is in em-glob.el, so 
it should be harder to break in the future.
[0001-Improve-correctness-of-Eshell-globs-when-using-escap.patch (text/plain, attachment)]

This bug report was last modified 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.