+@defun read-shell-command prompt &optional initial-contents hist &rest args
+This function reads a shell command from the minibuffer, prompting
+with @var{prompt} and providing intelligent completion. It completes
+the first word of the command using candidates that are appropriate
+for command names, and the rest of the command words as file names.
+
+This function uses @code{minibuffer-local-shell-command-map} as the
+keymap for minibuffer input. The @var{hist} argument specifies the
+history list to use; if is omitted or @code{nil}, it defaults to
+@code{shell-command-history} (@pxref{Minibuffer History,
+shell-command-history}). The optional argument @var{initial-contents}
+specifies the initial content of the minibuffer (@pxref{Initial
+Input}). The rest of @var{args}, if present, are used as the
+@var{default} and @var{inherit-input-method} arguments in
+@code{read-from-minibuffer} (@pxref{Text from Minibuffer}).
+@end defun
+
+@defvar minibuffer-local-shell-command-map
+This keymap is used by @code{read-shell-command} for completing
+command and file names that are part of a shell command.
+@end defvar
+
+@node Completion Styles
+@subsection Completion Styles
+@cindex completion styles
+
+ A @dfn{completion style} is a set of rules for generating
+completions. The user option @code{completion-styles} stores a list
+of completion styles, which are represented by symbols.
+
+@defopt completion-styles
+This is a list of completion style symbols to use for performing
+completion. Each completion style in this list must be defined in
+@code{completion-styles-alist}.
+@end defopt
+
+@defvar completion-styles-alist
+This variable stores a list of available completion styles. Each
+element in the list must have the form @samp{(@var{name}
+@var{try-completion} @var{all-completions})}. Here, @var{name} is the
+name of the completion style (a symbol), which may be used in
+@code{completion-styles-alist} to refer to this style.
+
+@var{try-completion} is the function that does the completion, and
+@var{all-completions} is the function that lists the completions.
+These functions should accept four arguments: @var{string},
+@var{collection}, @var{predicate}, and @var{point}. The @var{string},
+@var{collection}, and @var{predicate} arguments have the same meanings
+as in @code{try-completion} (@pxref{Basic Completion}), and the
+@var{point} argument is the position of point within @var{string}.
+Each function should return a non-@code{nil} value if it performed its
+job, and @code{nil} if it did not (e.g., if there is no way to
+complete @var{string} according to the completion style).
+
+When the user calls a completion command, such as
+@code{minibuffer-complete} (@pxref{Completion Commands}), Emacs looks
+for the first style listed in @code{completion-styles} and calls its
+@var{try-completion} function. If this function returns @code{nil},
+Emacs moves to the next completion style listed in
+@code{completion-styles} and calls its @var{try-completion} function,
+and so on until one of the @var{try-completion} functions successfully
+performs completion and returns a non-@code{nil} value. A similar
+procedure is used for listing completions, via the
+@var{all-completions} functions.
+@end defvar
+
+ By default, @code{completion-styles-alist} contains five pre-defined
+completion styles: @code{basic}, a basic completion style;
+@code{partial-completion}, which does partial completion (completing
+each word in the input separately); @code{emacs22}, which performs
+completion according to the rules used in Emacs 22; @code{emacs21},
+which performs completion according to the rules used in Emacs 21; and
+@code{initials}, which completes acronyms and initialisms.
+