]> git.eshelyaron.com Git - emacs.git/commit
Follow POSIX/GNU argument conventions for 'eshell-eval-using-options'
authorJim Porter <jporterbugs@gmail.com>
Tue, 4 Jan 2022 20:58:38 +0000 (12:58 -0800)
committerEli Zaretskii <eliz@gnu.org>
Wed, 12 Jan 2022 14:58:37 +0000 (16:58 +0200)
commitdb745f37aec2adc44ec4b2eae0720e0365ed0ca9
tree1c2b405ad2bc81d34fd2ae140c18855d78460665
parent7ebcb4b6f2f4531ebc893bb3b2f74d6298bf9b41
Follow POSIX/GNU argument conventions for 'eshell-eval-using-options'

* lisp/eshell/esh-opt.el (eshell--split-switch): New function.
(eshell-set-option): Allow setting a supplied value instead of always
consuming from 'eshell--args'.
(eshell--process-option): Support consuming option values specified as
a single token.
(eshell--process-args): For short options, pass full switch token to
'eshell--process-option'.

* test/lisp/eshell/esh-opt-tests.el (esh-opt-process-args-test): Fix
test.
(test-eshell-eval-using-options): Add tests for various types of
options.

* doc/misc/eshell.texi (Defining new built-in commands): New
subsection, describe how to use 'eshell-eval-using-options'.

* etc/NEWS: Announce the change.
doc/misc/eshell.texi
etc/NEWS
lisp/eshell/esh-opt.el
test/lisp/eshell/esh-opt-tests.el