Command lists

In order to make the toolbar components do things commands must be attached to them. This is accomplished by using command lists. Command lists are mini programs written in a very limited language. The language can only call functions that are built into lortug, call shell commands, substitute variables and make simple decisions (I hesitate to call it branching since it is so limited).

Central to command lists in the notion of expansion. Expansion is the substituting of either the output from a command or the value of a variable into another command. This is accomplished by enclosing the function call or variable in {}. This allows one to use the value of a variable or the output from another command as the argument to another command.

There are four components that can be used in a command list: built-in functions, shell commands, variables and decisions.

An actual command list is built up by nesting the above elements inside each other to create single commands and then these commands are put into a list that is executed in order. The toplevel commands are delimited by ;'s. Any character that has special meaning to the command interpreter can be escaped (remove its special meaning) by using the \ character. The following examples should make all of this a bit clearer.