Interactive Commands (Units: A Unit Conversion Program and Scientific Calculator)

### 2.1 Interactive Commands ¶

Typing `help` at either prompt displays a short help message. You can also type `help` followed by a unit name. This will invoke a pager on the units database at the point where that unit is defined. You can read the definition and comments that may give more details or historical information about the unit. If your pager allows, you may want to scroll backwards, e.g. with ‘`b`’, because sometimes a longer comment about a unit or group of units will appear before the definition. You can generally quit out of the pager by pressing ‘`q`’.

Typing `search` text will display a list of all units whose names contain text as a substring along with their definitions. This may help in the case where you aren’t sure of the right unit name. Typing `search .` will display a list of all units; this can be helpful if you aren’t sure of an appropriate substring, though examining the output can be tedious. Here ‘`.`’ is a special argument to the `search` command, not a regular expression. If you want to use a regular expression to search units and their definitions, the `--list-units` option will display a list of all units, which can be sent to a filter such as `grep`. Typing `search _` will display a list of all assigned runtime variables—whose names begin with ‘`_`’—without including all units whose names simply contain ‘`_`’. See Variables Assigned at Run Time for more information on runtime variables.

Typing `version` will display the `units` version number; unlike the `--version` option, only the version number is shown, regardless of any other settings. Full information is available with the `info` command.

Typing `info` will display the same information as the `--info` option, described in Invoking `units`.

Many values set by command-line options can also be set interactively by typing `set` option`=`value; typing `set` option will show the value for that option. Typing `set` will show a list of options that can be set; options set to other than default values will have a prepended ‘`*`’. See Setting Options Interactively for more information.