GNU bug report logs - #55204
29.0.50; Improve quoting consistency in Eshell predicates/modifiers

Previous Next

Package: emacs;

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

Date: Sun, 1 May 2022 04:38:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Improve quoting consistency in Eshell predicates/modifiers
Date: Sat, 30 Apr 2022 21:37:20 -0700
Currently, there are some inconsistencies with how string parameters 
should be quoted in Eshell argument predicates/modifiers (hereafter just 
"predicates"). First, the possible delimiters for a given predicate vary 
based on which predicate is used. Currently, the allowed delimiters are:

Any non-digit character:
  u (user)
  g (group)
  a (access time)
  m (modification time)
  c (change time)
Any character:
  :i (include)
  :x (exclude)
  :s (substitute)
"'" or "/":
  :j (join)
  :S (split)

Relatedly, although the string parameters are parsed so that you can 
escape the delimiter with "\", the backslash isn't actually removed 
before using the parameter. For example, from "emacs -Q --eval '(eshell)':

  ~ $ echo $(list "foo" "bar")(:j'\'')
  foo\'bar

That should print "foo'bar" instead. Similarly, when redirecting output 
to a buffer, escapes aren't properly removed. Again, from "emacs -Q 
--eval '(eshell)'":

  ~ $ echo hi > #<foo\>bar>
  ;; Writes to the buffer "foo\>bar"

Patch forthcoming shortly (just getting a bug number first).




This bug report was last modified 3 years and 23 days ago.

Previous Next


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