Function: eshell/env

eshell/env is a byte-compiled function defined in esh-var.el.gz.

Signature

(eshell/env &rest ARGS)

Documentation

Implementation of env in Lisp.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-var.el.gz
(defun eshell/env (&rest args)
  "Implementation of `env' in Lisp."
  (eshell-eval-using-options
   "env" args
   '(;; FIXME: Support more "env" options, like "--unset".
     (?h "help" nil nil "show this usage screen")
     :external "env"
     :parse-leading-options-only
     :usage "[NAME=VALUE]... [COMMAND]...")
   (if args
       (or (eshell-parse-local-variables args)
           (throw 'eshell-replace-command
                  `(eshell-named-command ,(car args) ',(cdr args))))
     (eshell-with-buffered-print
       (dolist (setting (sort (eshell-environment-variables) 'string-lessp))
         (eshell-buffered-print setting "\n"))))))