(emacs)Shell Mode


Next: Shell History Prev: Interactive Shell Up: Shell

Shell Mode
----------

   The shell buffer uses Shell mode, which defines several special keys
attached to the `C-c' prefix.  They are chosen to resemble the usual
editing and job control characters present in shells that are not under
Emacs, except that you must type `C-c' first.  Here is a complete list
of the special key bindings of Shell mode:

`RET'
     At end of buffer send line as input; otherwise, copy current line
     to end of buffer and send it (`comint-send-input').  When a line is
     copied, any text at the beginning of the line that matches the
     variable `shell-prompt-pattern' is left out; this variable's value
     should be a regexp string that matches the prompts that your shell
     uses.

`TAB'
     Complete the command name or file name before point in the shell
     buffer (`comint-dynamic-complete').  TAB also completes history
     references; see Note: History References.

`M-?'
     Display temporarily a list of the possible completions of the file
     name before point in the shell buffer
     (`comint-dynamic-list-filename-completions').

`C-a'
     Move to the beginning of the line, but after the prompt if any
     (`comint-bol').

`C-d'
     Either delete a character or send EOF
     (`comint-delchar-or-maybe-eof').  Typed at the end of the shell
     buffer, `C-d' sends EOF to the subshell.  Typed at any other
     position in the buffer, `C-d' deletes a character as usual.

`C-c C-u'
     Kill all text pending at end of buffer to be sent as input
     (`comint-kill-input').

`C-c C-w'
     Kill a word before point (`backward-kill-word').

`C-c C-c'
     Interrupt the shell or its current subjob if any
     (`comint-interrupt-subjob').

`C-c C-z'
     Stop the shell or its current subjob if any (`comint-stop-subjob').

`C-c C-\'
     Send quit signal to the shell or its current subjob if any
     (`comint-quit-subjob').

`C-c C-o'
     Kill the last batch of output from a shell command
     (`comint-kill-output').  This is useful if a shell command spews
     out lots of output that just gets in the way.

`C-c C-r'
     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').

`C-c C-e'
     Scroll to put the end of the buffer at the bottom of the window
     (`comint-show-maximum-output').

`C-c C-f'
     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.

`C-c C-b'
     Move backward across one shell command, but not beyond the current
     line (`shell-backward-command').

`M-x dirs'
     Ask the shell what its current directory is, so that Emacs can
     agree with the shell.

`M-x send-invisible RET TEXT RET'
     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.

`M-x comint-continue-subjob'
     Continue the shell process.  This is useful if you accidentally
     suspend the shell process.(1)

   Shell mode also customizes the paragraph commands so that only shell
promps start new paragraphs.  Thus, a paragraph consists of an input
command plus the output that follows it in the buffer.

   ---------- Footnotes ----------

   (1)  You should not suspend the shell process.  Suspending a subjob
of the shell is a completely different matter-that is normal practice,
but you must use the shell to continue the subjob; this command won't
do it.


automatically generated by info2www