Variable: shell-has-auto-cd
shell-has-auto-cd is a customizable variable defined in shell.el.gz.
Value
nil
Documentation
If non-nil, shell-mode handles implicit "cd" commands.
Implicit "cd" is changing the directory if the command is a directory. You can make this variable buffer-local to change it, per shell-mode instance. Useful for shells like zsh that has this feature.
This variable was added, or its default value changed, in Emacs 28.1.
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/shell.el.gz
(defcustom shell-has-auto-cd nil
"If non-nil, `shell-mode' handles implicit \"cd\" commands.
Implicit \"cd\" is changing the directory if the command is a directory.
You can make this variable buffer-local to change it, per shell-mode instance.
Useful for shells like zsh that has this feature."
:type 'boolean
:group 'shell-directories
:version "28.1")