Zoom Shell allows you to set environment variables of two kinds. The first is the kind you might be used to -- shell variables which are passed on to any process started by Zoom Shell. The second is private variables, which are only used by the Zoom Shell command interpreter.
Please browse and run the files "variable_fun.zsh", "built_in_fun.zsh", and "function_fun.zsh" in the samples directory to see how to set and manipulate variables.
Use
Environment variables are passed on to any process started by Zoom Shell. In addition, you may access the variables at the command prompt. Zoom Shell supports three syntaxes for variable substitution. The prefered method uses the dollar sign and squiggle bracket:
cd ${windir} (go to the Windows directory)cd $windir (go to the Windows directory)
cd %windir% (go to the Windows directory)
net use ${logonserver}\shared (map a drive to the logonserver's "shared" drive)
Environment Editor
The central place for viewing or modifying environment variables is under the Environment tab in the Zoom Shell Help Desk, which has three fields.
The first is a read-only field that displays the variables already defined by the system and inherited by Zoom Shell, plus (Windows NT only) those variables which Zoom Shell itself defined and has already loaded.
The next displays environment variables which Zoom Shell will define when it starts up, and will pass on to other applications.
The third shows private environment variables, which Zoom Shell will use but not pass on to other applications.
System Variables
When Zoom Shell starts up it inherits the environment from whatever process starts it -- usually the Program Manager. It inherits the PATH, TEMP, TMP, plus several other variables. You can type the set command in a DOS window or in Zoom Shell to see what the system variables are. These variables are set when Windows first starts up.
Zoom Shell Environment Variables
When Zoom Shell starts it also reads a file called .profile in its home directory. That file contains any environment variables that you want to pass on to other applications, such as a modified path.
By default, the .profile file contains only one variable, ZSInherit. This variable is used when you start Zoom Shell within Zoom Shell. It tells any child Zoom Shell not to read the .profile file again. Future versions of Zoom Shell may use it for other purposes as well.
You may also use the setenv command to set a temporary environment variable. For example, the program ncftp requires a "home" environment variable:
Any varaibles set by the setenv command will go away when you close and re-start Zoom Shell.
You can set private variables at the command line, or by entering the variable in the environment editor.
The example above demonstrates a few important things. Directories with spaces in their names need to be enclosed in quotes, which is what is being done on line 3. Line 3 also demonstrates a built-in variable, the date variable.
You can make private variables available to other applications by using the export command:
Here are the variables built into Zoom Shell: