Subject: bug#55204: 29.0.50; Improve quoting consistency in Eshell predicates/modifiers

From: Jim Porter <[email-masked]>
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).