Variable: shell-dirtrack-mode-hook
shell-dirtrack-mode-hook is a customizable variable defined in
shell.el.gz.
Value
nil
Documentation
Hook run after entering or leaving shell-dirtrack-mode(var)/shell-dirtrack-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/shell.el.gz
(define-minor-mode shell-dirtrack-mode
"Toggle directory tracking in this shell buffer (Shell Dirtrack mode).
The `dirtrack' package provides an alternative implementation of
this feature; see the function `dirtrack-mode'. Also see
`comint-osc-directory-tracker' for an escape-sequence based
solution."
:lighter nil
(setq list-buffers-directory (if shell-dirtrack-mode default-directory))
(if shell-dirtrack-mode
(add-hook 'comint-input-filter-functions #'shell-directory-tracker nil t)
(remove-hook 'comint-input-filter-functions #'shell-directory-tracker t)))