[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2004-11-02
Medium Priority
Last Modified: 2013-12-27
How can I enable the auto-complete feature with the TAB key?
Does this depend on the shell?
I use Korn or C shell.
Question by:iamjhkang
LVL 38

Accepted Solution

yuzh earned 200 total points
ID: 12479737
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.

LVL 10

Expert Comment

ID: 12480034
tcsh --- YUCK !!!!!!!

Use bash .... Much better shell ... IMHO ;)

Expert Comment

ID: 12482204
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>"

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 48

Expert Comment

ID: 12489627

You forgot <esc>\
for ksh filename completion.

LVL 38

Expert Comment

ID: 12489685
Good point  Tintin, thanks!

Author Comment

ID: 12725030
in ksh,
typing some letters and typing twice "esc" makes auto-completion.

to do that how can I set configuration?
LVL 38

Expert Comment

ID: 12732186
after you typing something, type <Esc> once and then follow by a \ key.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question