Difference between revisions of "SET HISTORY"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 41: | Line 41: | ||
==Example== | ==Example== | ||
− | <pre>// Example using config.db file | + | <pre> |
+ | // Example using config.db file | ||
set history on | set history on | ||
set histpath on | set histpath on |
Revision as of 14:41, 11 March 2009
Contents
SET HISTORY
Class
Error Handling and Debugging
Purpose
Determines whether commands are stored in a command history buffer
Syntax
SET HISTORY TO [<expN>] | FILE <.his filename> | (<expC>)
SET HISTORY ON | OFF | (<expL>)
See Also
DISPLAY HISTORY, DO, LIST HISTORY, SET COMPILE, SET DEVELOPMENT, SET DOHISTORY, SET HISTPATH, DB_SAVEHISTORY
Description
The command history buffer holds the most recent commands that have been executed from the command prompt. To inspect the command history, use the LIST HISTORY or DISPLAY HISTORY commands. IF KBEDIT is set ON, the [CURSOR UP] and [CURSOR DOWN] keys can be used to scroll through and select a previous command for re-execution. The command can be edited before being re-executed. By default HISTORY is ON and 20 command lines are stored.
If SET DOHISTORY is also ON, then commands executed from interpreted program files will also be stored in the command history buffer. Program files are run interpreted, rather than compiled, when SET COMPILE is OFF and SET DEVELOPMENT is OFF.
Command history buffers are saved between sessions in the ’command.his’ file. Subsequent sessions in the same directory will be able to access earlier history buffers. This functionality is only available if the environment variable / symbol DB_SAVEHISTORY is set to true.
TO <expN> The SET HISTORY TO <expN> command specifies the maximum number of command lines that will be stored.
TO FILE The TO FILE clause enables you to record your history in the specified <.his filename>. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. If SET DOHISTORY is also ON then commands executed from interpreted program files will also be stored in the command history. Each line that is executed is placed into the <.his filename>, next to the name, stack number and line number of the executing program. If SET HISTPATH is ON, then the commands also include the current directory name, e.g.
/home/recital/test/:keyboard(0:1): do myprog
/home/recital/test/:myprog(1:1): do subprog
/home/recital/test/:subprog(2:1): open database southwind
Example
// Example using config.db file set history on set histpath on set history to file myhist set dohistory on // End of config.db // Command prompt example set history to 100 set history on dir use patrons index events list history
Products
Recital Database Server, Recital Mirage Server, Recital Terminal Developer