How can I enable the auto-complete feature with the TAB key?

How can I enable the auto-complete feature with the TAB key?
Does this depend on the shell?
I use Korn or C shell.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ksh and C shell does NOT have such feature!

ksh can complete pathnames with a little bit more complicated sequence.

set -o vi        # set ksh input editor = vi
you can put this statement in your .profile file to get it automatically executed

type a partial pathname
press <esc> to go in command mode
press =   to get a list of pathnames that complete your partial pathname OR
press *    to expand your partial pathname to the complete list of completing pathnames

and you can do "vi" style commandline search for command history.

IF you want TAB completion, use tcsh shell.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tcsh --- YUCK !!!!!!!

Use bash .... Much better shell ... IMHO ;)
The bash shell gives you the tab-key auto-complete feature, and another selling point is that it is commonly used on Linux systems, which means that many people have experience of using it.

"bash" was shipped as part of Solaris from Solaris 8 onwards.

To switch to bash immediately, type "bash" (and "exit" to go back to your normal shell)

To switch to bash permanently, you need to change your default shell - "usermod -s /bin/bash <username>"

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.


You forgot <esc>\
for ksh filename completion.

Good point  Tintin, thanks!
iamjhkangAuthor Commented:
in ksh,
typing some letters and typing twice "esc" makes auto-completion.

to do that how can I set configuration?
after you typing something, type <Esc> once and then follow by a \ key.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.