SourceForge Logo
boxenv User Commands (cmd)

quicktrans Directive List

Document Description:


This page is meant to serve as a compainion to the main quicktrans documentation page. It is a run-down of some of the directives available to quicktrans and quicktrans-sr.

Not all directives are mentioned here, but collectively, this page and the main page should document them all.

Directives:


cmd

cmd simply invokes a command, and stores the result of the command in an environment variable. It has two arguments. The first argument is the name of the environment variable that the result gets stored in, and the second argument is the command that is executed for that purpose.

cmdx

cmdx is a modified version of cmd that was created just in case the program should quit in the event of a certain output value. This directive has three arguments. The first argument is the name of the environment variable that successful output will be stored in. The second argument is the command that will be executed, who's output will be collected and evaluated. The third argument is the one possible output of the command that would cause the program to put a Fatal Error.

For example, if you wanted to find the location of the a command called sort, and wanted the program to terminate should that command not be found, you might have the following directive-command:
  cmd:XX_SORT_PLACE:ufwhich sort::

in which the third argument would be an empty string, causing the program to terminate if the command "ufwhich sort" sends an empty string to Standard Output.

cmdy

cmdy is a modified version of cmd that was created just in case the program should quit in the event that the command has an output other than the expected output. This directive has three arguments. The first argument is the name of the environment variable that successful output will be stored in. The second argument is the command that will be executed, who's output will be collected and evaluated. The third argument is the one possible output of the command that would be interpreted as a sccessful output.

isexist

The isexist directive was, as may be obvious, implemented as an interface to the isexist user-command. It was implemented because when cmdy would be used to invoke isexist in the name of an environment variable, the error output was not particularly useful. The isexist directive has two arguments. The first argument is the name of the environment variable who's value will be passed to the isexist user-command. The second argument is the output of isexist that would be considered successful output.