Difference between revisions of "SET HISTORY"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
==Class== | ==Class== | ||
Error Handling and Debugging | Error Handling and Debugging | ||
Line 17: | Line 14: | ||
==See Also== | ==See Also== | ||
− | [[DISPLAY HISTORY]], [[DO]], [[LIST HISTORY]], [[SET COMPILE]], [[SET DEVELOPMENT]], [[SET DOHISTORY]], [[SET HISTPATH | + | [[DB_SAVEHISTORY]], [[DISPLAY HISTORY]], [[DO]], [[LIST HISTORY]], [[SET COMPILE]], [[SET DEVELOPMENT]], [[SET DOHISTORY]], [[SET HISTPATH]] |
Line 27: | Line 24: | ||
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. | 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> | + | ====TO <expN>==== |
The SET HISTORY TO <expN> command specifies the maximum number of command lines that will be stored. | The SET HISTORY TO <expN> command specifies the maximum number of command lines that will be stored. | ||
− | TO FILE | + | ====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. | 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. | ||
Line 41: | Line 38: | ||
==Example== | ==Example== | ||
− | < | + | <code lang="recital"> |
// Example using config.db file | // Example using config.db file | ||
set history on | set history on | ||
Line 54: | Line 51: | ||
dir | dir | ||
use patrons index events | use patrons index events | ||
− | list history</ | + | list history</code> |
==Products== | ==Products== |
Revision as of 10:25, 16 April 2009
Contents
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
DB_SAVEHISTORY, DISPLAY HISTORY, DO, LIST HISTORY, SET COMPILE, SET DEVELOPMENT, SET DOHISTORY, SET HISTPATH
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