Command line completion
From Wikipedia, the free encyclopedia
Command line completion is a common feature of command line interpreters, in which the program automatically fills in partially typed tokens. Depending on the specific interpreter and its configuration, these elements may include commands, arguments, environment variable names and other entities. Command line completion generally only works in interactive mode.[1] Command line completion is often invoked, by default, by pressing the tab key and frequently called tab completion even when bound to a different key or key combination.
Contents |
[edit] History
Tab completion showed up early in computing history; one of the first examples appeared in the Berkeley Timesharing system for the SDS-940, where if a typed string were ambiguous, the interpreter would do nothing, but if the string was not ambiguous, it would automatically complete it without any command from the user. This feature did not work well with the all too frequent typos, and so was a mixed blessing. This feature was imitated by Tenex's developers who made an important change: Tenex used "escape recognition", in which the interpreter would not attempt to autocomplete unless the escape key was struck (thus the name) by the user. The domain was also expanded from only program names on the Berkeley system to both program names and files on Tenex.[1] From there it was borrowed by Unix.
[edit] Completion in different command line interfaces
- Unix shells have a long-standing tradition of advanced and customizable completion capabilities (see the external links section below for some examples).
- Windows PowerShell, the new extensible command shell from Microsoft, which is based on object-oriented programming and the Microsoft .NET framework provides powerful and customizable completion capabilities similar to those of traditional Unix shells.
- The cmd.exe command processor of Windows NT-based systems supports basic completion. It is possible to use a separate key-binding for matching directory names only.
- The MS-DOS command processor command.com did not have command line completion: pressing the tab key would just advance the cursor. Before the release of Windows however various enhanced shells for MS-DOS, such as 4DOS, would feature Unix-style tab completion.
- Mac OS 9 and all classic Macintosh Operating Systems before did not have a command line interface at all.
- Mac OS X provides Terminal – a Unix-style terminal emulator – to interact with the computer through a command line interface which has Unix shell completion capabilities.
[edit] See also
[edit] References
- ^ That is, it cannot be invoked to complete partially typed commands in scripts or batch files, even if the completion is unambiguous.
[edit] External links
[edit] Unix shells
[edit] Windows command interpreters
(Be sure to check the "Applies to" section in each article)
- Windows Server 2003:
- Windows XP
- Windows 2000/NT 4