Apt-get :: Apt-get <tab>



How is it that when you type "apt-get install (first few letters of a package)<tab>" when running bash under rxvt, it can complete a package name? How is that implemented? I have many people wondering how that works, as it is a very useful feature.  Thank you in advance.
What I know is that if you are in a console (root or not) if you type one or more keys and then press tab it shows you the list of command beggining with that leter/s and if there are a lot of them display and advice, something like:
"the keys you have pressed will show xxxxx commands do you like see? ((y/n)
For seeing a list of stuff with apt-get I type apt-cache search xxxx being in root mode
Cheers!

Quote (Kuro @ April 15 2004,12:58)
How is it that when you type "apt-get install (first few letters of a package)<tab>" when running bash under rxvt, it can complete a package name? How is that implemented? I have many people wondering how that works, as it is a very useful feature.  Thank you in advance.

Command line completion is part of the shell, not actually part of apt or rxvt.  The shell, in this case, is Ash, provided by the busybox utility.


original here.