]> git.eshelyaron.com Git - emacs.git/commit
Add support for chaining conditionals in Eshell
authorJim Porter <jporterbugs@gmail.com>
Sat, 5 Oct 2024 05:26:01 +0000 (22:26 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 17 Oct 2024 18:51:27 +0000 (20:51 +0200)
commit7a5c0d9f84f8713122b039dc4d419997cd52daae
tree18603daf962fa8fb367493edbc02ec7f80247ec8
parenta78204c24c7c0db442735480bd06bceca0a342c2
Add support for chaining conditionals in Eshell

* lisp/eshell/esh-cmd.el (eshell-structure-basic-command): Check for the
presence of the conditional.  Allow any number of BODY forms.
(eshell-rewrite-if-command): Add support for 'else' keyword and chained
conditionals.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/if-else-statement):
Test 'else' keyword.
(esh-cmd-test/if-else-statement-chain): New test.

* doc/misc/eshell.texi (Control Flow): Document this change.

* etc/NEWS: Announce this change.

(cherry picked from commit fada04cfc788a486265c9da6636611986b48ae49)
doc/misc/eshell.texi
etc/NEWS
lisp/eshell/esh-cmd.el
test/lisp/eshell/esh-cmd-tests.el