Template:Use dmy dates {{#invoke:Infobox|infobox}}Template:Template other{{#invoke:Check for unknown parameters | check | showblankpositional=1 | unknown = Template:Main other | preview = Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y | AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo upright | logo size | logo title | logo_alt | logo_caption | logo_upright | logo_size | logo_title | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot upright | screenshot size | screenshot title | screenshot_alt | screenshot_upright | screenshot_size | screenshot_title | service_name | size | standard | title | ver layout | website | qid }}Template:Main other DOSKEY is a command in DOS, OS/2,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Windows,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> and ReactOS<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> that adds command history, macro functionality, and improved editing features to the COMMAND.COM and cmd.exe command-line interpreter shells.

HistoryEdit

The command was included as a terminate-and-stay-resident program with MS-DOS and PC DOS versions 5 and later,<ref name="RUNNINGMSDOS">Template:Cite book</ref> then Windows 9x,<ref>Template:Cite book</ref> and finally Windows 2000<ref>Template:Cite book</ref> 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.<ref>OS/2 2.0 Redbooks Volume 2 - DOS and Windows Environment (GG24-3731)</ref>

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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

UsageEdit

Command switchesEdit

DOSKEY allows the use of several command switches:

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

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

Keyboard shortcutsEdit

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

Template:Keypress and Template:Keypress
Recall commands
Template:Keypress
Clears command line
Template:Keypress
Clears command line from the cursor to the beginning of the line.
Template:Keypress
Clears command line from the cursor to the end of the line.
Template:Keypress
Displays command history
Template:Keypress
Clears command history
Template:Keypress
Searches command history
Template:Keypress
Selects a command by number
Template:Keypress
Clears macro definitions

Command macrosEdit

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

Template:Mono
Command separator. Allows multiple commands in a macro.
Template:MonoTemplate:Mono
Batch parameters. Equivalent to Template:Mono-Template:Mono in batch programs.
Template:Mono
Symbol replaced by everything following the macro name on command line.

AlternativesEdit

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<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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 alsoEdit

ReferencesEdit

Template:Reflist

Further readingEdit

External linksEdit

Template:Sister project

Template:Windows commands