6

I've worked in Linux before where when I press tab it autocompletes until it becomes ambiguous. If I pressed tab twice at that point it would give me a list of all possible completions.

My current Linux environment does not have the second feature(enabled?). So if I press tab it will autocomplete but it won't list all possible completions after that.

How can I add/enable this feature?

EDIT: turns out it's in csh not bash

3
  • 1
    What environment is this? Yes, we are accustomed to be pampered by Linux and GNU tools. Commented Jun 19, 2014 at 23:26
  • Redhat Release 5.6 Commented Jun 19, 2014 at 23:56
  • I don't know if it is configured exactly the same on a RH (I don't have one to check atm), but there should be a /etc/bash_completion file coming with bash, which you only need to source In you own session startup scripts (or enable site wide in /etc/bash.bashrc). Commented Jun 22, 2014 at 16:58

2 Answers 2

2

Try this :

in ~/.cshrc put

set filec set autolist 

if you don't want list when autocompletes, use

set autolist = ambiguous set complete = enhance 
2
  • It's not quite what I want in that a single tab autcompletes AND lists, but I'm not sure you can do better. Commented Jun 26, 2014 at 17:00
  • You may be right. If i find anything to add i'll post it ASAP Commented Jun 27, 2014 at 7:39
1

To set autolist to show choices only when completion fails and adds no new characters to the word being completed:

set autolist ambiguous 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.