When the shell is running interactively, it changes its behavior in several ways.
SIGTTIN, SIGTTOU, and SIGTSTP. PS1 before reading the first line of a command, and expands and displays PS2 before reading the second and subsequent lines of a multi-line command. Bash expands and displays PS0 after it reads a command but before executing it. See Controlling the Prompt, for a complete list of prompt string escape sequences. PROMPT_COMMAND variable as a command before printing the primary prompt, $PS1 (see Bash Variables). ignoreeof option to set -o instead of exiting immediately when it receives an EOF on its standard input when reading a command (see The Set Builtin). $HISTFILE when a shell with history enabled exits. SIGTERM (see Signals). SIGINT is caught and handled (see Signals). SIGINT will interrupt some shell builtins. SIGHUP to all jobs on exit if the huponexit shell option has been enabled (see Signals). MAIL, MAILPATH, and MAILCHECK shell variables (see Bash Variables). ${var:?word} expansions (see Shell Parameter Expansion). exec will not cause the shell to exit (see Bourne Shell Builtins). cd builtin is enabled by default (see the description of the cdspell option to the shopt builtin in The Shopt Builtin). TMOUT variable and exit if a command is not read within the specified number of seconds after printing $PS1 (see Bash Variables).
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
Licensed under the GNU Free Documentation License.
https://www.gnu.org/software/bash/manual/html_node/Interactive-Shell-Behavior.html