Environment Management: Commands

The commands described in this section are used to manage named environmentsand can also be used independently of VOV.

Command Description
vel List all available environments.
ves Switch between environments.
vec Create an environment variable for each LOGICAL name used in the equiv.tcl file (works only if connected to a VOV project)

vel: List Environments

To list all available environments use vel (Vov Environment List). Here is an example:
% vel
vel: message: Environment directories:
1 /release/VOV/latest/sun5/local/environments
1 * tcl BASE            UNIX utilities, X11, and VOV.
1 . tcl D               Define variables: Usage: ves "+D(V1=value1,...)"
1 . tcl DEFAULT         Just a name for whatever you already have.
1 . tcl DOT             Append "." to the path variable
1 . tcl GNU             gcc, g++, emacs1 . tcl OCTTOOLS Octtools 5.1
1 . csh CSHRC           Source the ~/.cshrc file.
1 . csh LIBTECH         Library Technologies, Inc.
1 . csh SOS             SOS from ClioSoft (Revision control manager)
1 . csh SPICE           The analog simulator SPICE.
1 . csh TRAINING        Used for VOV Basic Training
1 . tcl MSDEV           Windows:  VisualC++ development.
First, vel shows a list of directories where environments can be found. Then for each environment, the command shows:
  • The ordinal number of the directory where the environment definition resides
  • An asterisc to identify the current environment (BASE in the example) or a dot for all other environments
  • A label to identify the syntax used to describe the environment, which is either Tcl or csh
  • The name of the environment
  • A short description of the environment

ves: Switch Environment

To switch to an environment use ves (Vov Environment Switch) as in the following examples:
% ves BASE
% ves SPICE
% ves +TRAINING
% ves BASE+TRAINING
% ves 'BASE+D(DISPLAY=tahoe:0.0)'
% ves BASE+D,DISPLAY=tahoe:0.0
The first two examples are simple switches from the current environment to the specified environment. Each switch involves two steps:
  1. Exiting the current environment
  2. Entering the new environment

The third and fourth examples illustrate the use of combined environments. If you prefix the environment name with a "+", VOV enters the new environment without exiting from the current one.

The fifth example shows the use of Parameterized Environments. Proper quotation must be used because parameter passing requires special characters, the parentheses, which can be consumed by the shell if not protected.

The sixth example show the same parameterized environment specified using the "comma syntax" instead of the parentheses. This syntax is easier to use because it does not require quoting of the environment specification.

A side effect of switching environment is that the prompt is changed, unless the variable VOV_USE_VEP is set to 0.

Using a Tcl file as Environment
You can also use ves with a Tcl file as argument. A typical example can be the setup.tcl file in the SWD directory of a project
% ves proj.swd/setup.tcl 

vec: Promote Equivalences to Environment Variables (UNIX only)

The equivalence file may establish an equivalence between a logical name and a physical path and it is not necessary that the logical name be the value of a predefined environment variable.

For example, the equivalence file may define:
vtk_equivalence WORK1 /remote/projects/work1
so that the files under /remote/projects/work1/* will be referred to with the name ${WORK1}/*.

When working from the command line, it may be convenient to define the variable WORK1. This can be done automatically with the command vec.

Example:
% echo $WORK1
WORK1: Undefined variable.
% vec
% echo $WORK1
/remote/projects/work1