Next: Cursor Commands, Previous: What is Info, Up: Top
GNU Info accepts several options to control the initial node being viewed, and to specify which directories to search for Info files. Here is a template showing an invocation of GNU Info from the shell:
info [option]... [menu-item...]
The program accepts the following options:
--apropos=
stringYou can invoke the apropos command from inside Info; see Searching Commands.
--directory
directory-path-d
directory-path--directory
multiple times; once for each directory which contains Info files. The
list of directories searched by Info is constructed from the value of
the environment variable INFOPATH
; --directory
causes the
named directory-path to be prepended to that list. The value of
INFOPATH
is a list of directories usually separated by a colon;
on MS-DOS/MS-Windows systems, the semicolon is used. If you do not
define INFOPATH
, Info uses a default path defined when Info was
built as the initial list of directories. If the value of
INFOPATH
ends with a colon (or semicolon on MS-DOS/MS-Windows),
the initial list of directories is constructed by appending the
build-time default to the value of INFOPATH
.
--dribble=
dribble-file--file
filename-f
filenamedir
; if you use this option, Info will start with
(
filename)Top
as the first file and node.
If filename is an absolute file name, or begins with ./ or
../, Info looks for filename only in the directory of the
specified filename, and adds the directory of filename to
the value of INFOPATH
. In contrast, if filename is in the
form of a relative file name, but without the ./ or ../
prefix, Info will only look for it in the directories specified in
INFOPATH
. In other words, Info does not treat file names
which lack ./ and ../ prefix as relative to the current
directory.
In every directory Info tries, if filename is not found, Info
looks for it with a number of known extensions of Info files1. For every
known extension, Info looks for a compressed file, if a regular file
isn't found. Info supports files compressed with gzip
,
bzip2
, compress
and yabba
programs; it calls
gunzip
, bunzip2
, uncompress
and unyabba
,
accordingly, to decompress such files. Compressed Info files are
assumed to have .z, .gz, .bz2, .Z, or
.Y extensions, possibly in addition to one of the known Info
files extensions2.
--help
-h
--index-search
stringThis command can also be invoked from inside Info; see Searching Commands.
--node
nodename-n
nodename--file
3. You may specify --node
multiple times; for
an interactive Info, each nodename is visited in its own window,
for a non-interactive Info (such as when --output
is given) each
nodename is processed sequentially.
--output
filename-o
filename-
for filename specifies
the standard output.
--raw-escapes
--no-raw-escapes
-R
--no-raw-escapes
to make Info remove them.
--restore=
dribble-file--show-options
--usage
-O
M-x goto-invocation
command (see goto-invocation) from inside
Info.
--speech-friendly
-b
--subnodes
--output
. It means to recursively output the nodes appearing in
the menus of each node being output. Menu items which resolve to
external Info files are not output, and neither are menu items which are
members of an index. Each node is only output once.
--version
--vi-keys
vi
and Less. The default key bindings are generally
modeled after Emacs.
(See Custom Key Bindings,
for a more general way of altering GNU Info's key bindings.)
--where
--location
-w
dir
), the second argument is a menu item in the first argument's
node, etc. You can easily move to the node of your choice by specifying
the menu names which describe the path to that node. For example,
info emacs buffers
first selects the menu item `Emacs' in the node `(dir)Top', and then selects the menu item `Buffers' in the node `(emacs)Top'.
To avoid searching the dir files and just show some arbitrary file, use `-f' and the filename, as in `info -f ./foo.info'.
The index search and the search for the node which describes program invocation and command-line options begins after processing all the command-line menu items. Therefore, the Info file searched for the index or the invocation node is the file where Info finds itself after following all the menu items given on the command line. This is so `info emacs --show-options' does what you'd expect.
[1] .info, -info, /index, and .inf.
[2] The MS-DOS version allows for the Info
extension, such as .inf
, and the short compressed file
extensions, such as .z and .gz, to be merged into a single
extension, since DOS doesn't allow more than a single dot in the
basename of a file. Thus, on MS-DOS, if Info looks for bison,
file names like bison.igz and bison.inz will be found and
decompressed by gunzip
.
[3] Of course, you can specify both the file and node
in a --node
command; but don't forget to escape the open and
close parentheses and whitespace from the shell as in: info --node
"(emacs)Buffers"
.