Jump to content

Command-line completion

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Eddpayne (talk | contribs) at 10:25, 24 August 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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.