From: Jim Porter Date: Wed, 16 Aug 2023 01:52:11 +0000 (-0700) Subject: ; Be more strict with command arguments for a few Eshell commands X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f513d699e4f52104bea9bb67327f9e6053a433b1;p=emacs.git ; Be more strict with command arguments for a few Eshell commands * lisp/eshell/em-dirs.el (eshell/pwd): * lisp/eshell/em-unix.el (eshell/whoami): * lisp/eshell/esh-proc.el (eshell/jobs): Don't accept arguments. (cherry picked from commit c4d16909fa4c30fd5f11bd66de7936790349cb7d) --- diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index cf90a8bb230..85036620c57 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -316,7 +316,7 @@ Thus, this does not include the current directory.") (`(boundaries . ,suffix) `(boundaries 0 . ,(string-search "/" suffix)))))))))) -(defun eshell/pwd (&rest _args) +(defun eshell/pwd () "Change output from `pwd' to be cleaner." (let* ((path default-directory) (len (length path))) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index dad02206759..c3c3fea691a 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -1018,7 +1018,7 @@ Show wall-clock time elapsed during execution of COMMAND.") (eshell-stringify-list (flatten-tree (cdr time-args)))))))) -(defun eshell/whoami (&rest _args) +(defun eshell/whoami () "Make \"whoami\" Tramp aware." (eshell-user-login-name)) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 2bb0043bddb..35c81f6a4b2 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -193,7 +193,7 @@ This is like `process-live-p', but additionally checks whether (defalias 'eshell/wait #'eshell-wait-for-process) -(defun eshell/jobs (&rest _args) +(defun eshell/jobs () "List processes, if there are any." (and (fboundp 'process-list) (process-list)