]> git.eshelyaron.com Git - emacs.git/commit
Allow splicing Eshell globs in-place
authorJim Porter <jporterbugs@gmail.com>
Thu, 17 Aug 2023 19:23:26 +0000 (12:23 -0700)
committerJim Porter <jporterbugs@gmail.com>
Mon, 21 Aug 2023 18:42:46 +0000 (11:42 -0700)
commitcf52cdb121b9419f169c501e7d8499aa418a0d5c
tree4c41447107dfd379dbeb1307046c0fb6803ac7f4
parent82d8732505d267b5152320300b3ebd1a2727bead
Allow splicing Eshell globs in-place

This means that Eshell globs can now expand the same way as if the
user had typed each matching file individually.

* lisp/eshell/em-glob.el (eshell-glob-splice-results): New option.
(eshell-no-command-globbing, eshell-add-glob-modifier): Handle spliced
globs.
(eshell-extended-glob): Always return a list when splicing.

* lisp/eshell/em-pred.el (eshell-parse-arg-modifier): Ensure
'eshell-splice-args' is always at the end of the list of modifiers if
present.

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/expand/splice-results)
(em-glob-test/expand/no-splice-results)
(em-glob-test/expand/explicitly-splice-results)
(em-glob-test/expand/explicitly-listify-results): New tests.
(em-glob-test/no-matches): Check result when
'eshell-glob-splice-results' is nil/non-nil.

* doc/misc/eshell.texi (Arguments): Expand explanation about argument
flattening.
(Globbing): Document splicing behavior of globs.

* etc/NEWS: Announce this change.
doc/misc/eshell.texi
etc/NEWS
lisp/eshell/em-glob.el
lisp/eshell/em-pred.el
test/lisp/eshell/em-glob-tests.el