"The function used to normalize the value of Eshell's `pwd'.
The value returned by `pwd' is also used when recording the
last-visited directory in the last-dir-ring, so it will affect the
"The function used to normalize the value of Eshell's `pwd'.
The value returned by `pwd' is also used when recording the
last-visited directory in the last-dir-ring, so it will affect the
"If non-nil, the size of the directory history ring.
This ring is added to every time `cd' or `pushd' is used. It simply
stores the most recent directory locations Eshell has been in. To
"If non-nil, the size of the directory history ring.
This ring is added to every time `cd' or `pushd' is used. It simply
stores the most recent directory locations Eshell has been in. To
-return to the most recent entry, use 'cd -' (equivalent to 'cd -0').
-To return to an older entry, use 'cd -N', where N is an integer less
+return to the most recent entry, use `cd -' (equivalent to `cd -0').
+To return to an older entry, use `cd -N', where N is an integer less
-matching a particular regexp, use 'cd =REGEXP'. To display the
-directory history list, use 'cd ='.
+matching a particular regexp, use `cd =REGEXP'. To display the
+directory history list, use `cd ='.
This mechanism is very similar to that provided by `pushd', except
it's far more automatic. `pushd' allows the user to decide which
This mechanism is very similar to that provided by `pushd', except
it's far more automatic. `pushd' allows the user to decide which
(when eshell-cd-on-directory
(make-local-variable 'eshell-interpreter-alist)
(setq eshell-interpreter-alist
(when eshell-cd-on-directory
(make-local-variable 'eshell-interpreter-alist)
(setq eshell-interpreter-alist
With the following piece of advice, you can make this functionality
available in most of Emacs, with the exception of filename completion
With the following piece of advice, you can make this functionality
available in most of Emacs, with the exception of filename completion
(defun eshell/cd (&rest args) ; all but first ignored
"Alias to extend the behavior of `cd'."
(setq args (eshell-flatten-list args))
(defun eshell/cd (&rest args) ; all but first ignored
"Alias to extend the behavior of `cd'."
(setq args (eshell-flatten-list args))
(let ((curdir (eshell/pwd)))
(if (string-match path curdir)
(setq path (replace-match subpath nil nil curdir))
(let ((curdir (eshell/pwd)))
(if (string-match path curdir)
(setq path (replace-match subpath nil nil curdir))
- (setq dired-directory (or path "~"))
- (let ((curdir (eshell/pwd)))
- (unless (equal curdir dired-directory)
+ (let ((curdir (eshell/pwd))
+ (newdir (or path "~")))
+ (unless (equal curdir newdir)