Send quit signal to the shell or its current subjob if any (comint-quit-subjob). This command also kills any shell input pending in the shell buffer and not yet sent.
Delete the last batch of output from a shell command (comint-delete-output). This is useful if a shell command spews out lots of output that just gets in the way. This command used to be called comint-kill-output.
Write the last batch of output from a shell command to a file (comint-write-output). With a prefix argument, the file is appended to instead. Any prompt at the end of the output is not written.
Scroll to display the beginning of the last batch of output at the top of the window; also move the cursor there (comint-show-output).
Scroll to put the end of the buffer at the bottom of the window (comint-show-maximum-output).
Move forward across one shell command, but not beyond the current line (shell-forward-command). The variable shell-command-regexp specifies how to recognize the end of a command.
Move backward across one shell command, but not beyond the current line (shell-backward-command).
Display the buffer's history of shell commands in another window (comint-dynamic-list-input-ring).
Ask the shell what its current directory is, so that Emacs can agree with the shell.
Send text as input to the shell, after reading it without echoing. This is useful when a shell command runs a program that asks for a password.
Alternatively, you can arrange for Emacs to notice password prompts and turn off echoing for them, as follows:
(add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt)
Continue the shell process. This is useful if you accidentally suspend the shell process.1
Discard all control-M characters from the current group of shell output. The most convenient way to use this command is to make it run automatically when you get output from the subshell. To do that, evaluate this Lisp expression:
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
This command truncates the shell buffer to a certain maximum number of lines, specified by the variable comint-buffer-maximum-size. Here's how to do this automatically each time you get output from the subshell:
(add-hook 'comint-output-filter-functions

