Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'tab-completion' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
tab-completion
Authored by: tapella on Mar 06, '01 12:04:09PM

Your default shell should be set up for tab-completion, which makes typing these ghastly escape sequences easier (i.e., helps to make all those backslashes).
Tab-completion is really useful anywhere in the shell though... all it means is that when you've typed part of a word and then push 'tab', the shell will try to complete the rest of the word in an intelligent way. For example, let's say you have a directory with the files:
aFile
anotherFile with Spaces in THe NAME
doc1
doc2

Let's say you want to use the 'less' command to view the contents of aFile. You can type...
less aFile
less aF[tab]

In the 2nd case, after typing those two unique letters and tabbing, the rest of the file name will be completed.

If you want to do something with that 2nd file with the scary name, it's easy to just type:
less an[tab]

And it will fill in all the junk necessary for you.

For the 3rd and 4th files, since their names are so similar you really just need to type out the full names...

I hope this is news to someone ;)



[ Reply to This | # ]