]> git.eshelyaron.com Git - emacs.git/commit
esh-opt.el: Fix improper parsing of first argument (Bug#28323)
authorJay Kamat <jaygkamat@gmail.com>
Tue, 8 May 2018 19:04:00 +0000 (12:04 -0700)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 3 Jun 2018 01:18:47 +0000 (21:18 -0400)
commit47ab98ebea7e33b4dc95157300dadf124a087292
tree4f148fd0eeaa545ee8726f20bd8fb63990ecb7fc
parentc1a55466bc27d066af24ef115b23ea0ccff78428
esh-opt.el: Fix improper parsing of first argument (Bug#28323)

Examples of broken behavior:

    sudo -u root whoami
    Outputs: -u
    ls -I '*.txt' /dev/null
    Errors with: *.txt: No such file or directory

* lisp/eshell/esh-opt.el (eshell--process-args): Refactor usage of
args to eshell--args, as we rely on modifications from
eshell--process-option and vice versa.  These modifications were not
being propogated in the (if (= ai 0)) case, since popping the first
element of a list doesn't destructively modify the underlying list
object.

(cherry picked from commit 92a8230e49a65be48442ee95cf50c90514e48f99)
lisp/eshell/esh-opt.el