open encyclopedia * Article Search: * *
*
*

Tab completion

From open-encyclopedia.com - the free encyclopedia.

Tab Completion, when used in a computing context, normally refers to the function in Unix shells where pressing the tab key on the keyboard with an incomplete filename will either complete the filename (if the amount typed is unambiguous) or will fill in the common characters in file names until a difference is found. For example, if a directory contains the following files:

Contents_01
Contents_02
Contents_11
Contents_11_Draft_1
Contents_11_Draft_2

then if the user types a capital C and presses tab, the shell will complete up to the first point of difference in the filenames and the shell will show Contents_, from where the user can either complete the filename manually or fill in more and then press tab again. For example, to access the file Contents_11_Draft_1, the user could key C tab 1 1 _ tab 1, which the shell would fill in as Contents_11_Draft_1, saving a lot of keystrokes on keying the full filename.

If the list of possible options for completion is great, the shell will display a yes/no question for the user to determine whether to show the whole list.

Completion in MS-DOS

MS-DOS never featured tab completion originally, and pressing the Tab key there would output an actual tab space. In the pre-Windows days, various enhanced shells for MS-DOS such as 4DOS would feature tab completion exactly as in Unix.

In the command prompt under Windows XP, cmd.exe, completion, though not through the Tab key, is available by launching the command prompt in extended mode:

cmd /f:on

In this mode, filenames can be completed by pressing Control-F and directories can be completed by pressing Control-D.

Contribute Found an omission? You can freely contribute to this Wikipedia article. Edit Article
Copyright © 2003-2004 Zeeshan Muhammad. All rights reserved. Legal notices. Part of the New Frontier Information Network.