[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.10 Environment

An environment variable `AVMINPUTS` can be made to store a list of directories (using the `set` or `export` commands) that `avram` will search for input files. The directories should be separated by colons, similarly to the `PATH` environment variable.

The search paths in `AVMINPUTS` apply only to the names of input files given on the command line (Command Line Syntax) when `avram` is invoked in parameter mode (Parameter Mode). They do not apply to the name of the virtual code file, which is always assumed to be either absolute or relative to the current working directory (this assumption being preferable in the case of a script like that of Example Script).

Starting in the first directory in the list of `AVMINPUTS`, `avram` searches for a file exactly as its name appears on the command line (subject to the expansion of special characters by the shell). If it is not found and the name does not contain a period, but a command line option of ‘`-.EXT`’ has been used, `avram` will then search for a file with that name combined with the extension `.EXT`. If ‘`-.EXT`’ has not been used or if no matching file is found with it, `avram` tries the extensions of `.avm` and `.fun` in that order, provided the given file name contained no periods. If no match is found for any of those cases, `avram` proceeds to search the next directory in the list obtained from `AVMINPUTS`, and so on. It stops searching when the first match is found. For subsequent input files, the search begins again at the first directory.

If `AVMINPUTS` is defined, the current working directory is not searched for input files unless it is listed. If it is empty or not defined, a default list of search paths is used, currently

    .:/usr/local/lib/avm:/usr/lib/avm:/lib/avm:/opt/avm:/opt/lib/avm\
    :/usr/local/share/avm:/usr/share/avm:/share/avm:/opt/avm:/opt/share/avm

These paths are defined in `avram.c` and can be changed by recompiling it.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on November 8, 2012 using texi2html 1.82.