+@item $#var[hello]
+Returns the length of the cdr of the element of @code{var} who car is equal
+to @code{"hello"}.
+
+@end table
+
+@node Globbing
+@section Globbing
+Eshell's globbing syntax is very similar to that of Zsh. Users coming
+from Bash can still use Bash-style globbing, as there are no
+incompatibilities. Most globbing is pattern-based expansion, but there
+is also predicate-based expansion. See
+@ref{Filename Generation, , , zsh, The Z Shell Manual}
+for full syntax. To customize the syntax and behavior of globbing in
+Eshell see the Customize@footnote{@xref{Easy Customization, , , emacs,
+The GNU Emacs Manual}.}
+groups ``eshell-glob'' and ``eshell-pred''.
+
+@node Input/Output
+@chapter Input/Output
+Since Eshell does not communicate with a terminal like most command
+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 @code{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 @code{eshell-visual-subcommands}; and for
+commands that are visual only when passed certain options, use
+@code{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 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 @file{*scratch*} buffer.
+
+@code{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
+@file{/dev/clip}, which sends text to the clipboard.
+
+You can, of course, define your own virtual targets. They are defined
+by adding a list of the form @samp{("/dev/name" @var{function} @var{mode})} to
+@code{eshell-virtual-targets}. The first element is the device name;
+@var{function} may be either a lambda or a function name. If
+@var{mode} is @code{nil}, then the function is the output function; if it is
+non-@code{nil}, then the function is passed the redirection mode as a
+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.