If the variable
nil, insertion and yank commands scroll the selected window
to the bottom before inserting. The default is
comint-scroll-show-maximum-output is non-
arrival of output when point is at the end tries to scroll the last
line of text to the bottom line of the window, showing as much useful
text as possible. (This mimics the scrolling behavior of most
terminals.) The default is
comint-move-point-for-output, you can opt for
having point jump to the end of the buffer whenever output arrives—no
matter where in the buffer point was before. If the value is
this, point jumps in the selected window. If the value is
all, point jumps in each window that shows the Comint buffer. If
the value is
other, point jumps in all nonselected windows that
show the current buffer. The default value is
nil, which means
point does not jump to the end.
If you set
comint-prompt-read-only, the prompts in the Comint
buffer are read-only.
comint-input-ignoredups controls whether successive
identical inputs are stored in the input history. A non-
value means to omit an input that is the same as the previous input.
The default is
nil, which means to store each input even if it is
equal to the previous input.
Three variables customize file name completion. The variable
comint-completion-addsuffix controls whether completion inserts a
space or a slash to indicate a fully completed file or directory name
nil means do insert a space or slash).
comint-completion-recexact, if non-
nil, directs TAB
to choose the shortest possible completion if the usual Emacs completion
algorithm cannot add even a single character.
comint-completion-autolist, if non-
nil, says to list all
the possible completions whenever completion is not exact.
Command completion normally considers only executable files.
If you set
it considers nonexecutable files as well.
shell-completion-fignore specifies a list of file
name extensions to ignore in Shell mode completion. The default
nil, but some users prefer
("~" "#" "%") to
ignore file names ending in ‘~’, ‘#’ or ‘%’. Other
related Comint modes use the variable
Some implementation details of the shell command completion may also be found
in the lisp documentation of the
You can configure the behavior of ‘pushd’. Variables control
whether ‘pushd’ behaves like ‘cd’ if no argument is given
shell-pushd-tohome), pop rather than rotate with a numeric
shell-pushd-dextract), and only add directories to the
directory stack if they are not already on it
shell-pushd-dunique). The values you choose should match the
underlying shell, of course.
Comint mode sets the
TERM environment variable to a safe default
value, but this value disables some useful features. For example,
color is disabled in applications that use
TERM to determine if
color is supported. Therefore, Emacs provides an option
comint-terminfo-terminal to let you choose a terminal with more
advanced features, as defined in your system’s terminfo database.
Emacs will use this option as the value for
TERM so long as
system-uses-terminfo is non-
can be declared as connection-local variables to adjust these options
to match what a remote system expects (see Per-Connection Local Variables).