Difference between revisions of "SET HISTORY"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SET HISTORY=
 
 
 
==Class==
 
Error Handling and Debugging
 
 
 
 
==Purpose==
 
==Purpose==
 
Determines whether commands are stored in a command history buffer
 
Determines whether commands are stored in a command history buffer
Line 12: Line 5:
 
==Syntax==
 
==Syntax==
 
SET HISTORY TO [<expN>] | FILE <.his filename> | (<expC>)
 
SET HISTORY TO [<expN>] | FILE <.his filename> | (<expC>)
 +
 
SET HISTORY ON | OFF | (<expL>)
 
SET HISTORY ON | OFF | (<expL>)
  
  
 
==See Also==
 
==See Also==
DISPLAY HISTORY, DO, LIST HISTORY, SET COMPILE, SET DEVELOPMENT, SET DOHISTORY, SET HISTPATH, DB_SAVEHISTORY
+
[[DB_SAVEHISTORY]], [[DISPLAY HISTORY]], [[DO]], [[LIST HISTORY]], [[SET COMPILE]], [[SET DEVELOPMENT]], [[SET DOHISTORY]], [[SET HISTPATH]], [[SET KBEDIT]]
  
  
Line 26: Line 20:
 
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.
  
 
/home/recital/test/:keyboard(0:1): do myprog
 
/home/recital/test/:keyboard(0:1): do myprog
 +
 
/home/recital/test/:myprog(1:1): do subprog
 
/home/recital/test/:myprog(1:1): do subprog
 +
 
/home/recital/test/:subprog(2:1): open database southwind
 
/home/recital/test/:subprog(2:1): open database southwind
  
  
==  
+
==Example==
Example==
+
<code lang="recital">
 
// Example using config.db file
 
// Example using config.db file
 
set history on
 
set history on
Line 51: Line 47:
 
dir
 
dir
 
use patrons index events
 
use patrons index events
list history</pre>
+
list history</code>
  
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 +
[[Category:Documentation]]
 +
[[Category:Commands]]
 +
[[Category:Set_Commands|HISTORY]]
 +
[[Category:Error Handling and Debugging]]
 +
[[Category:Error Handling and Debugging Set Commands]]

Latest revision as of 15:55, 23 November 2009

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, SET KBEDIT


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 Server, Recital