# Command: page

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    page - Conveniently display contents of a long file

Synopsis:

    (filename) page ->	-

Examples:

      The following example displays the license agreement that came with
      your copy of NEST:

      "statusdict /prgdatadir get (/LICENSE) join page"

Description:

      The "page" command is used by NEST's online-help system to display
      the help pages. It displays the contents of a file, either through a
      built-in pager, or an external pager program. The text you are
      reading right now is displayed using "page".

      You can customize the display. Type "/page ShowOptions" to show your
      current settings. Use the "SetOptions" command to customize the
      pager program. Here are some useful suggestions. You will want to
      put your favourite into your  /.nestrc file (see "/nestrc help"):

      1. /page << /command (more)	 % Use more as a pager
      /wait   true >> SetOptions % and wait for termination

      2. /page << /command (less -S)	 % Use less as a pager
      /wait   true >> SetOptions % and wait for termination

      3. /page << /command (xterm -e less -S)  % Run less in a separate xterm window...
      /wait   false >> SetOptions % ..so we can go on working in parallel.

      4. /page << /command (xless)	 % Use xless as a pager
      /wait   false >> SetOptions % xless opens it's own window.

      5. /page << /command (xemacs)	 % If you like to show helpfiles using xemacs.
      /wait   false >> SetOptions % xemacs opens it's own window.

      6. /page << /command false >> SetOptions % use built-in pager.

      7. /page ResetOptions % Return to the default configuration ($PAGER or built-in pager).

Options:

      /command	- UNIX command to display a file (default: see below)

      /command can be either false or a string.
      If /command is set to false, "page" uses the simple built-in
      pager "ppage" for display.

      If it is set to the name of a UNIX program, "page" will execute
      this program as a child process, passing the name of the
      file as argument.

      /command defaults to the contents of the $PAGER environment
      variable. If this variable is not set, it defaults to false.

      /wait	- whether to wait for the UNIX program to finish. (default: true)

      If /wait is set to true, the "page" command will not return until
      the UNIX process is terminated. Use this setting for all pager
      programs that write to stdout.

      If /wait is set to false, "page" will return immediately after
      creating the child process. Use this setting for all pager programs
      that open up their own window.

      The value of /wait is ignored, if /command is set to false.

Bugs:

    The string contained in /command is processed by "breakup" to separate
      the command from its parameters. Be aware that there is a bug in the
      "breakup"-routine, which makes it impossible to pass a parameter
      containing blanks by enclosing it in quotation marks.

      WARNING: Setting the /wait option to false with a pager
      program that writes to stdout will screw up your SLI prompt.

Remarks:

    If /wait is set to false, the "system"-command is called in
      no-care-mode. Be aware that this may be an expensive operation
      depending on the ressources your SLI-process occupies.
      (see description of "system").
      Even if /wait is set to true, creation of a child process may
      be expensive. To avoid any overhead caused by process creation, set /command
      to false.

Author:

    R Kupper

FirstVersion:

    Apr 22 1999, reworked 27-sep-2007

SeeAlso:

- help
- helpindex
- license
- system

Source:

    /opt/conda/conda-bld/nest_1510212701067/work/nest-2.14.0/lib/sli/helpinit.sli

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative