@c ================================================================
@ifnottex
-@node Top, What is Eshell?, (dir), (dir)
+@node Top
@top Eshell
Eshell is a shell-like command interpreter
@cmindex su
@itemx sudo
@cmindex sudo
-Uses TRAMP's @command{su} or @command{sudo} method to run a command via
-@command{su} or @command{sudo}.
+Uses TRAMP's @command{su} or @command{sudo} method @pxref{Inline methods, , , tramp}
+to run a command via @command{su} or @command{sudo}. These commands
+are in the eshell-tramp module, which is disabled by default.
@end table
@node Input/Output
@chapter Input/Output
Since Eshell does not communicate with a terminal like most command
-shells, IO is a little different. If you try to run programs from
-within Eshell that are not line-oriented, such as programs that use
-ncurses, you will just get garbage output, since the Eshell buffer is
-not a terminal emulator. Eshell solves this problem by running
-specified commands in Emacs's terminal emulator; to let Eshell know
-which commands need to be run in a terminal, add them to the list
-@var{eshell-visual-commands}.
-
+shells, IO is a little different.
+
+@section Visual Commands
+If you try to run programs from within Eshell that are not
+line-oriented, such as programs that use ncurses, you will just get
+garbage output, since the Eshell buffer is not a terminal emulator.
+Eshell solves this problem by running such programs in Emacs's
+terminal emulator.
+
+Programs that need a terminal to display output properly are referred
+to in this manual as ``visual commands,'' because they are not simply
+line-oriented. You must tell Eshell which commands are visual, by
+adding them to @var{eshell-visual-commands}; for commands that are
+visual for only certain @emph{sub}-commands -- e.g. @samp{git log} but
+not @samp{git status} -- use @var{eshell-visual-subcommands}; and for
+commands that are visual only when passed certain options, use
+@var{eshell-visual-options}.
+
+@section Redirection
Redirection is mostly the same in Eshell as it is in other command
-shells. The output redirection operators @code{>} and @code{>>} as well
-as pipes are supported, but there is not yet any support for input
-redirection. Output can also be redirected to Elisp functions, using
+shells. The output redirection operators @code{>} and @code{>>} as
+well as pipes are supported, but there is not yet any support for
+input redirection. Output can also be redirected to buffers, using
+the @code{>>>} redirection operator, and Elisp functions, using
virtual devices.
+The buffer redirection operator, @code{>>>}, expects a buffer object
+on the right-hand side, into which it inserts the output of the
+left-hand side. e.g., @samp{echo hello >>> #<buffer *scratch*>}
+inserts the string @code{"hello"} into the @code{*scratch*} buffer.
+
@var{eshell-virtual-targets} is a list of mappings of virtual device
names to functions. Eshell comes with two virtual devices:
@file{/dev/kill}, which sends the text to the kill ring, and
@code{function} may be either a lambda or a function name. If
@code{mode} is nil, then the function is the output function; if it is
non-nil, then the function is passed the redirection mode as a
-symbol--@code{overwrite}, @code{append}, or @code{insert}--and the
-function is expected to return the output function.
+symbol--@code{overwrite} for @code{>}, @code{append} for @code{>>}, or
+@code{insert} for @code{>>>}--and the function is expected to return
+the output function.
The output function is called once on each line of output until
@code{nil} is passed, indicating end of output.