There’s probably a name for this. And everyone else probably knows about it.

So I’m sitting there inside /usr/local/src. There’s a subdirectory called sox-12.17.7. I want to move into that subdirectory. Apparently — and I only found this today for the first time — I can simply type cd sox and then press the TAB key, and the OS automagically inserts the rest for me.

Comments

al o'neill's picture
al o'neill on May 19, 2005 - 18:54

When I first showed my ex-girlfriend how to run some command line game or other from my linux box and told her to press tab she exclaimed “ohhh NEEAT!!”. Most enthusiasm I’ve ever seen for a command-line.

Chris's picture
Chris on May 19, 2005 - 20:15

Windows XP Pro command line offers this feature as well. I discovered this after using the tab in a bash shell under bsd.

I’m not sure if XP Home is the same. Anyone?

Daniel Von Fange's picture
Daniel Von Fange on May 19, 2005 - 20:15

Technically known as “tab completion”. It’s a good thing.

Ken Williams's picture
Ken Williams on May 19, 2005 - 20:40

Yes it works in XP Home. And thanks.

paul's picture
paul on May 19, 2005 - 22:49

we call it autocomplete. and to be pedantic, it’s not the OS, but the shell (bash, I assume) that’s doing it. not all of them do (the old Bourne shell, for one).

Charles's picture
Charles on May 21, 2005 - 00:01

Another neat tab trick (at least in bash) is to type in the start of a command or path, and then hit tab twice. It shows you a list of all the possible matches. IE, type joe /etc/host(tab, tab) and it gives you host.conf, hostname, hosts, etc… Type man(tab, tab) and it shows you man, man2dvi, man2html, etc… Very useful if you can’t remember the name of one of those programs with no vowels.

Add new comment