4

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

  • 1
    What environment is this? Yes, we are accustomed to be pampered by Linux and GNU tools. – vonbrand Jun 19 '14 at 23:26
  • Redhat Release 5.6 – xsdf Jun 19 '14 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). – didierc Jun 22 '14 at 16:58
1

Try this :

in ~/.cshrc put

set filec
set autolist
  • It's not quite what I want in that a single tab autcompletes AND lists, but I'm not sure you can do better. – xsdf Jun 26 '14 at 17:00
  • You may be right. If i find anything to add i'll post it ASAP – DNS1 Jun 27 '14 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.