### 2.3 Commands for Getting Help

The entire text of this manual is available from the Octave prompt via the command `doc`. In addition, the documentation for individual user-written functions and variables is also available via the `help` command. This section describes the commands used for reading the manual and the documentation strings for user-supplied functions and variables. See Function Files, for more information about how to document the functions you write.

— Command: help name

> Display the help text for name. If invoked without any arguments, `help` prints a list of all the available operators and functions.

> For example, the command `help help` prints a short message describing the `help` command.

> The help command can give you information about operators, but not the comma and semicolons that are used as command separators. To get help for those, you must type `help comma` or `help semicolon`.

> See also: doc, which, lookfor.

— Command: doc function_name

> Display documentation for the function function_name directly from an on-line version of the printed manual, using the GNU Info browser. If invoked without any arguments, the manual is shown from the beginning.

> For example, the command `doc rand` starts the GNU Info browser at this node in the on-line version of the manual.

> Once the GNU Info browser is running, help for using it is available using the command `C-h`.

> See also: help.

— Command: lookfor str
— Command: lookfor -all str
— Function: [fun, helpstring] = lookfor (str)
— Function: [fun, helpstring] = lookfor ('-all', str)

> Search for the string str in all of the functions found in the function search path. By default `lookfor` searches for str in the first sentence of the help string of each function found. The entire help string of each function found in the path can be searched if the '-all' argument is supplied. All searches are case insensitive.

> Called with no output arguments, `lookfor` prints the list of matching functions to the terminal. Otherwise the output arguments fun and helpstring define the matching functions and the first sentence of each of their help strings.

> Note that the ability of `lookfor` to correctly identify the first sentence of the help of the functions is dependent on the format of the functions help. All of the functions in Octave itself will correctly find the first sentence, but the same can not be guaranteed for other functions. Therefore the use of the '-all' argument might be necessary to find related functions that are not part of Octave.

> See also: help, which.

The following function can be used to change which programs are used for displaying the documentation, and where the documentation can be found.

— Built-in Function: val = info_file ()
— Built-in Function: old_val = info_file (new_val)

> Query or set the internal variable that specifies the name of the Octave info file. The default value is `"`octave-home`/info/octave.info"`, in which octave-home is the directory where all of Octave is installed.

> See also: info_program, doc, help, makeinfo_program.

— Built-in Function: val = info_program ()
— Built-in Function: old_val = info_program (new_val)

> Query or set the internal variable that specifies the name of the info program to run. The default value is `"`octave-home`/libexec/octave/`version`/exec/`arch`/info"` in which octave-home is the directory where all of Octave is installed, version is the Octave version number, and arch is the system type (for example, `i686-pc-linux-gnu`). The default initial value may be overridden by the environment variable `OCTAVE_INFO_PROGRAM`, or the command line argument `--info-program NAME`.

> See also: info_file, doc, help, makeinfo_program.

— Built-in Function: val = makeinfo_program ()
— Built-in Function: old_val = makeinfo_program (new_val)

> Query or set the internal variable that specifies the name of the makeinfo program that Octave runs to format help text containing Texinfo markup commands. The default initial value is `"makeinfo"`.

> See also: info_file, info_program, doc, help.

— Built-in Function: val = suppress_verbose_help_message ()
— Built-in Function: old_val = suppress_verbose_help_message (new_val)

> Query or set the internal variable that controls whether Octave will add additional help information to the end of the output from the `help` command and usage messages for built-in commands.