From 70c5a88bfdad9da1f2732b82e8a9e3169fe20edd Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Wed, 19 Jan 2022 19:01:42 -0800 Subject: [PATCH 2/2] Don't use 'eshell-eval-using-options' for 'eshell/source' or 'eshell/.' This makes 'source' and '.' in Eshell more compatible with regular shells, which just treat the first argument as the file to source and all subsequent arguments as arguments to that file. * lisp/eshell/em-script.el (eshell/source, eshell/.): Don't use 'eshell-eval-using-options'. --- lisp/eshell/em-script.el | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index e8459513f3..e0bcd8b099 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el @@ -113,27 +113,13 @@ eshell-source-file (defun eshell/source (&rest args) "Source a file in a subshell environment." - (eshell-eval-using-options - "source" args - '((?h "help" nil nil "show this usage screen") - :show-usage - :usage "FILE [ARGS] -Invoke the Eshell commands in FILE in a subshell, binding ARGS to $1, -$2, etc.") - (eshell-source-file (car args) (cdr args) t))) + (eshell-source-file (car args) (cdr args) t)) (put 'eshell/source 'eshell-no-numeric-conversions t) (defun eshell/. (&rest args) "Source a file in the current environment." - (eshell-eval-using-options - "." args - '((?h "help" nil nil "show this usage screen") - :show-usage - :usage "FILE [ARGS] -Invoke the Eshell commands in FILE within the current shell -environment, binding ARGS to $1, $2, etc.") - (eshell-source-file (car args) (cdr args)))) + (eshell-source-file (car args) (cdr args))) (put 'eshell/. 'eshell-no-numeric-conversions t) -- 2.25.1