Function: eshell/pwd

eshell/pwd is a byte-compiled function defined in em-dirs.el.gz.

Signature

(eshell/pwd &rest ARGS)

Documentation

Change output from pwd to be cleaner.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-dirs.el.gz
(defun eshell/pwd (&rest _args)
  "Change output from `pwd' to be cleaner."
  (let* ((path default-directory)
	 (len (length path)))
    (if (and (> len 1)
	     (eq (aref path (1- len)) ?/)
	     (not (and (eshell-under-windows-p)
		       (string-match "\\`[A-Za-z]:[\\/]\\'" path))))
	(setq path (substring path 0 (1- (length path)))))
    (funcall (or eshell-pwd-convert-function #'identity) path)))