- Registry (the `REGISTRY` command)

- The registry is a table of named references to all running commands.
- It allows commands to communicate with other commands by name.
- When a command is run in the background (or run in a pipe) an entry for it is added to the registry.
- The registry can be accessed via a table (`REG`) or the `REGISTRY` command (usually shortened to `REG`).

      nM> plot/bg world.prm
      nM> reg
        T: REG             = Table of 3 entries
        O:  PLOT           = P: PLOT,FILE=world.prm,/BG=
        O:  SHELL          = nxm.sys.lib.Shell@c1cd1f
        T:  HANDLERS       = Table of 3 entries

- The registry table has three special entries:

  SHELL | Entry for the NeXtMidas shell.
  HANDLERS | Table of handlers (file, packet, resource, etc.)
  MAIN | When running inside a macro only, an entry for the current macro.

- The registry table has entries for the currently running commands.
  - By default each entry has the same name as the command being run.
  - If multiple commands with the same name are run, a number is added after the name.
  - If the `/ID=<name>` switch is used, the `<name>` is used. (This is extremely common inside a macro.)

        nM> plot/bg/id=myplot world.prm
        nM> reg
          T: REG             = Table of 3 entries
          O:  SHELL          = nxm.sys.lib.Shell@c1cd1f
          T:  HANDLERS       = Table of 3 entries
          O:  MYPLOT         = P: PLOT,FILE=world.prm,/BG=,/ID=myplot