Function: eshell/addpath
eshell/addpath is a byte-compiled function defined in esh-ext.el.gz.
Signature
(eshell/addpath &rest ARGS)
Documentation
Add a set of paths to PATH.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-ext.el.gz
(defun eshell/addpath (&rest args)
"Add a set of paths to PATH."
(eshell-eval-using-options
"addpath" args
'((?b "begin" nil prepend "add to beginning of $PATH")
(?h "help" nil nil "display this usage message")
:usage "[-b] DIR...
Adds the given DIR to $PATH.")
(let ((path (eshell-get-path t)))
(if args
(progn
(setq path (if prepend
(append args path)
(append path args)))
(eshell-set-path path)
(string-join path (path-separator)))
(dolist (dir path)
(eshell-printn dir))))))