variables

Associated commands:

/listvar
list values of variables.
/set
set the value of a global variable
/let
set the value of a local variable
/setenv
set the value of an environment variable
/unset
unset a variable
/export
move an global variable to the environment
/edvar
edit a variable's value

A TinyFugue variable has a name and a value. Names are case sensitive, and should start with a letter and contain only letters, numbers, and underscores. A value can be any string, but special flag and numeric variables will automatically convert their value to an integer.

Variables may either be local, global, or exported. Global variables are visible to all tf commands; they are defined with /set or /setenv, or imported from the environment when tf starts. Local variables are created with /let or assignment expressions, and only exist in the scope in which they were created. Exported variables are global variables which are also visible to subshells, so they can be used by commands /sh, the '!' option of /quote, and file uncompression. Variables are exported if they were defined with /setenv, explicitly exported with /export, or imported from tf's parent environment.

The value of a variable can be obtained using a '%' substitution (see "substitution"), or by simply using its name in an expression (see "expressions").

See "special variables" for a list of special variables.


Back to index
Back to tf home page
Copyright © 1995 - 1999 Ken Keys