Variable: shell-history-file-name
shell-history-file-name is a customizable variable defined in
shell.el.gz.
Value
nil
Documentation
The history file name used in shell-mode.
When it is a string, this file name will be used.
When it is nil, the environment variable HISTFILE is used.
When it is t, no history file name is used in shell-mode.
The settings obey whether shell-mode is invoked in a remote buffer.
In that case, HISTFILE is taken from the remote host, and the string is
interpreted as local file name on the remote host.
If shell-mode is invoked in a local buffer, and no history file name
can be determined, a default according to the shell type is used.
This variable was added, or its default value changed, in Emacs 30.1.
Probably introduced at or before Emacs version 30.1.
Source Code
;; Defined in /usr/src/emacs/lisp/shell.el.gz
(defcustom shell-history-file-name nil
"The history file name used in `shell-mode'.
When it is a string, this file name will be used.
When it is nil, the environment variable HISTFILE is used.
When it is t, no history file name is used in `shell-mode'.
The settings obey whether `shell-mode' is invoked in a remote buffer.
In that case, HISTFILE is taken from the remote host, and the string is
interpreted as local file name on the remote host.
If `shell-mode' is invoked in a local buffer, and no history file name
can be determined, a default according to the shell type is used."
:type '(choice (const :tag "Default" nil) (const :tag "Suppress" t) file)
:version "30.1")