Command History
Encyclopedia
Command history is a feature in many operating system shells, computer algebra programs, and other software
that allows the user to recall, edit and rerun previous commands.
History was first introduced by Bill Joy
in the C shell
in 1978. It quickly became popular because it made the C shell fast and easy to use. History has since become a standard feature in other shells, including ksh
, bash and Microsoft
's cmd.exe
. History addressed two important scenarios:
In Joy's original C shell, the user could refer to a previous command by typing an exclamation,
The usual implementation today is to combine history with command-line editing. The cursor keys are used to navigate up and down through the history list and left or right to anyplace on the line, where the user can simply type a desired change. But some implementations are menu
-based: The user presses a certain function key which displays a menu of recent commands, which the user can select one by typing a number.
Computer software
Computer software, or just software, is a collection of computer programs and related data that provide the instructions for telling a computer what to do and how to do it....
that allows the user to recall, edit and rerun previous commands.
History was first introduced by Bill Joy
Bill Joy
William Nelson Joy , commonly known as Bill Joy, is an American computer scientist. Joy co-founded Sun Microsystems in 1982 along with Vinod Khosla, Scott McNealy and Andy Bechtolsheim, and served as chief scientist at the company until 2003...
in the C shell
C shell
The C shell is a Unix shell that was created by Bill Joy while a graduate student at University of California, Berkeley in the late 1970s. It has been distributed widely, beginning with the 2BSD release of the BSD Unix system that Joy began distributing in 1978...
in 1978. It quickly became popular because it made the C shell fast and easy to use. History has since become a standard feature in other shells, including ksh
Korn shell
The Korn shell is a Unix shell which was developed by David Korn in the early 1980s and announced at USENIX on July 14, 1983. Other early contributors were AT&T Bell Labs developers Mike Veach, who wrote the emacs code, and Pat Sullivan, who wrote the vi code...
, bash and Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
's cmd.exe
Cmd.exe
Command Prompt is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems...
. History addressed two important scenarios:
- Executing the same command or a short sequence of commands over and over. An example might be a developer frequently compiling and running a program.
- Correcting mistakes or rerunning a command with only a small modification.
In Joy's original C shell, the user could refer to a previous command by typing an exclamation,
!
, followed by additional characters to specify a particular command, only certain words, or to edit it in some way before pasting it back into the command line. For example:!!
meant the entire previous command.!$
meant just the last word of the previous command.!
abc meant the command that started with abc.
The usual implementation today is to combine history with command-line editing. The cursor keys are used to navigate up and down through the history list and left or right to anyplace on the line, where the user can simply type a desired change. But some implementations are menu
Menu (computing)
In computing and telecommunications, a menu is a list of commands presented to an operator by a computer or communications system. A menu is used in contrast to a command-line interface, where instructions to the computer are given in the form of commands .Choices given from a menu may be selected...
-based: The user presses a certain function key which displays a menu of recent commands, which the user can select one by typing a number.