Английская Википедия:DOSKEY

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Use dmy dates Шаблон:Infobox software DOSKEY is a command for DOS, IBM OS/2,[1] Microsoft Windows,[2] and ReactOS[3] that adds command history, macro functionality, and improved editing features to the command-line interpreters COMMAND.COM and cmd.exe.

History

The command was included as a terminate-and-stay-resident program with MS-DOS and PC DOS versions 5 and later,[4] then Windows 9x,[5] and finally Windows 2000[6] and later.

In early 1989, functionality similar to DOSKEY was introduced with DR-DOS 3.40 with its HISTORY CONFIG.SYS directive. This enabled a user-configurable console input history buffer and recall as well as pattern search functionality on the console driver level, that is, fully integrated into the operating system and transparent to running applications. In the summer of 1991, DOSKEY was introduced in MS-DOS/PC DOS 5.0 in order to provide some of the same functionality. DOSKEY also added a macro expansion facility, though special support was required before applications such as command line processors could take advantage of it. Starting with Novell DOS 7 in 1993, the macro capabilities were provided by an external DOSKEY command as well. In order to also emulate the DOSKEY history buffer functionality under DR-DOS, the DR-DOS DOSKEY worked as a front end to the resident history buffer functionality, which remained part of the kernel.

DOSKEY has also been included in IBM OS/2 Version 2.0.[7]

In current Windows NT-based operating systems, the DOSKEY functionality is built into CMD.EXE, although the DOSKEY command is still used to change its operation.

The DOSKEY command is not available in FreeDOS, which has such features built into the command interpreter.[8]

Usage

Command switches

DOSKEY allows the use of several command switches:

DOSKEY [/switch ...] [macroname=[text]]

Шаблон:Mono
Installs a new copy of DOSKEY.
Шаблон:Mono[size]
Sets size of command history buffer to size.
Шаблон:Mono
Displays all DOSKEY macros.
Шаблон:Mono
Displays all DOSKEY macros for all executables which have DOSKEY macros.
Шаблон:Mono[executable name]
Displays all DOSKEY macros for the given executable.
Шаблон:Mono
Displays all commands stored in memory.
Шаблон:Mono
Specifies that new text typed is inserted in old text.
Шаблон:Mono
Specifies that new text overwrites old text.
Шаблон:Monoexename
Specifies the executable.
Шаблон:Monofilename
Specifies a file of macros to install.
Шаблон:Mono
(undocumented - since MS-DOS 7)
Шаблон:Mono
(undocumented - since MS-DOS 7)
Шаблон:Mono
(undocumented - since MS-DOS 7)
Шаблон:Mono
(undocumented - since MS-DOS 7)
Шаблон:Mono
(undocumented - since MS-DOS 7)
[macroname]
Specifies a name for a macro created.
[text]
Specifies commands to record.

Keyboard shortcuts

During a DOSKEY session, the following keyboard shortcuts can be used:

Шаблон:Keypress and Шаблон:Keypress
Recall commands
Шаблон:Keypress
Clears command line
Шаблон:Keypress
Clears command line from the cursor to the beginning of the line.
Шаблон:Keypress
Clears command line from the cursor to the end of the line.
Шаблон:Keypress
Displays command history
Шаблон:Keypress
Clears command history
Шаблон:Keypress
Searches command history
Шаблон:Keypress
Selects a command by number
Шаблон:Keypress
Clears macro definitions

Command macros

DOSKEY implements support for command macros, a simple text-substitution facility which is used somewhat like command line aliases in other environments.

Шаблон:Mono
Command separator. Allows multiple commands in a macro.
Шаблон:MonoШаблон:Mono
Batch parameters. Equivalent to Шаблон:Mono-Шаблон:Mono in batch programs.
Шаблон:Mono
Symbol replaced by everything following the macro name on command line.

Alternatives

The absence of a command history in COMMAND.COM was a serious inconvenience ever since the earliest versions of MS-DOS. Numerous third-party programs have been written to address the issue; many were available long before Microsoft supplied DOSKEY. Some of them, including JP Software's 4DOS and NDOS, also provide additional editing capabilities lacking in DOSKEY, such as filename completion. Some of the better-known DOSKEY alternatives are Jack Gersbach's DOSEDIT, Chris Dunford's CED, Sverre Huseby's DOSED, Ashok Nadkarni's CMDEDIT, Steven Calwas's ANARKEY, Eric Tauck's TODDY, and enhanced DOSKEY written by Paul Houle.

Paul Houle's Enhanced DOSKEY[9] is designed to be an enhanced drop-in replacement for the DOSKEY.COM that ships with MS-DOS and Windows 9x/Windows Me. It also has a smaller disk and memory-resident footprint. The primary added feature is command and file "auto-completion" via the Tab key. Version 2.5, released in 2014, also adds full support for long filenames (LFN).

See also

References

Шаблон:Reflist

Further reading

External links

Шаблон:Wikibooks

Шаблон:Windows commands