]> git.eshelyaron.com Git - emacs.git/commit
esh-opt.el: Add a :parse-leading-options-only argument (Bug#28323)
authorJay Kamat <jaygkamat@gmail.com>
Tue, 8 May 2018 19:36:36 +0000 (12:36 -0700)
committerNoam Postavsky <npostavs@gmail.com>
Tue, 15 May 2018 23:32:49 +0000 (19:32 -0400)
commita4c616e27aa48e7d524e0c5cfaf67f17d04989e4
tree67ac930677e194e8ab3d583568c191c28294d996
parent92a8230e49a65be48442ee95cf50c90514e48f99
esh-opt.el: Add a :parse-leading-options-only argument (Bug#28323)

* lisp/eshell/esh-opt.el (eshell-eval-using-options): Add a new
:parse-leading-options-only argument which ignores dash/switch
arguments after the first positional argument.
(eshell--process-args): Abort processing of arguments if we see one
positional argument and :parse-leading-options-only is set.
* lisp/eshell/em-tramp.el (eshell/sudo): Use
:parse-leading-options-only, to avoid parsing subcommand switches as
switches of sudo itself.
* test/lisp/eshell/esh-opt-tests.el: Add tests for new and old behavior.
lisp/eshell/em-tramp.el
lisp/eshell/esh-opt.el
test/lisp/eshell/esh-opt-tests.el [new file with mode: 0644]