PATH

From ICE Enterprises
Jump to navigation Jump to search

Configures dictionary to resemble hierarchical search path

<FUNC>       - SHOW, SET, GET, ADD, ADD+, REMove, REDO, PUT, +, -  [DEF=SHOW]
<option 1:N> - Option or space separated list of options
<resname>    - Result name for GET function.

This command is a way of emulating the behavior of a hierarchical search path
with the option-driven configuration control.  The options are listed from left
to right with the leftmost option taking precedence over those to the right.

Functions:
  PATH GET <option> <resname>
    Gets the path for <option> and places it in the result <resname>.
    If no <resname> the path is printed to the screen.

  PATH SET <option1> <option2> ... <optionN>
    Commands from <option1> have precedence over <option2> commands which have
    precedence over SYS commands.  Note that the final "SYS" is not necessary
    since it is always implied.

  PATH ADD <option 1:N>
  PATH +   <option 1:N>
    Puts the <option> option on the front of the existing path.  This means
    that the <option> option will be searched before any other.  If the option
    already exists elsewhere in the path, it is moved from where it is
    to the beginning.

  PATH ADD+ <option 1:N>
    Puts the <option> on the end of the existing path but before SYS. If the
    option already exists elsewhere in the path, it is moved from where it is to
    the end but before SYS.

  PATH PUT <option 1:N>
    If <option> already exists on the path, does nothing (except notify the
    user). If <option> is not on path, performs an ADD.

  PATH REMove <option 1:N>
  PATH -      <option 1:N>
    Removes <option> from the existing path.

  PATH REDO
    Refreshes the current path using updated COMMANDS.CNF files.

  PATH SHOW
    Prints your current configuration.

  PATH
    Without any arguments, prints your current configuration.

PATH is for purposes of interface compatibility; it is composed simply of a
series of CONFIGURE commands.  To see what can be done with the NeXtMidas method
of configuration control, see EXPLAIN CONFIGURE.

The REDO function causes PATH to read the same series of COMMANDS.CNF files as
before.  This is useful if you happen to change one or more of your COMMANDS.CNF
files and you want to redo your same configuration (so that your in-memory
dictionary will reflect the change) without having to type all your same
arguments again.

PATH keeps track of its configuration with an environment symbol called
ENV.PATH.  Any changes to your dictionary through individual CONFIGURE or UPDATE
commands will not be reflected in this symbol; PATH should be the only command
that changes it.

To use a raw java jar (or directory of classes) with NeXtMidas, simply define
the jar as an option. For example,
  nM> option jython /path/to/jython.jar
  nM> path add jython

Examples:
  nM> PATH GET UCL uclpath
    Gets the path for UCL and places it in the result uclpath.

  nM> PATH SET site sys
    Allows site commands to have precedence over system commands.

  nM> PATH SET site user
    Allows SITE commands to have precedence over USER commands which have
    precedence over SYS commands.  Note that the final "SYS" is not necessary
    since it is always implied.

  nM> PATH SET user site proj sys
    Allows commands under the option PROJ to have precedence over system; SITE
    to have precedence over PROJ, and USER to have precedence over all of them.

  nM> PATH ADD ucl
    Puts the UCL option on the front of the existing path.

  nM> PATH ADD dsp ucl audio
    Puts the DSP option on the front of the existing path, then puts UCL on the
    front of that, then puts AUDIO on the front of that. The new path is now:
      AUDIO,UCL,DSP,<existing path>

  nM> PATH ADD+ ucl
    Puts the UCL option on the end of the existing path but before SYS.

  nM> PATH PUT ucl
    Puts the UCL option on the front of the path UNLESS it already exists
    somewhere on the path, in which case it does nothing.

  nM> PATH REMOVE user
   or
  nM> PATH REM user
    Removes the USER option from the existing path.

  nM> PATH/REDO
    Refreshes the current path using updated COMMANDS.CNF files.

  nM> PATH/RERUN
    Prints the current path and runs any optstart.mm macros in the option trees.

  nM> PATH
    Prints your current path configuration.

Switches:
  /REDO    - Refreshes the current path using updated COMMANDS.CNF files.
  /RERUN   - Reruns the optstart.mm macros in the option trees on the path.
  /SKIPRUN - Skip running optstart.mm macros in the option trees that are new
             on the path. (Since NeXtMidas 2.9.1) [DEF=FALSE]

See also:  CONFIGURE, UPDATE, OPTION