Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to update zsh's completion list with each key typed for commands that take a file/folder as a parameter (e.g. cd). In other words for these kinds of commands, the tab key would be implicitly pressed after each keypress:

cd ~/ (directories in ~/ are shown in the completion lsit)

(directories in ~/ are shown that start with a).

etc.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I was very curious after reading this question, so I started to research to see if it was possible. After some digging I arrived at auto-fu: https://github.com/hchbaw/auto-fu.zsh

auto-fu works quite well in my (very) brief testing. Hopefully it is what you're after.

share|improve this answer
    
Wow thanks this is great! A little bit buggy, but exactly what I was looking for. –  Felix Apr 1 '13 at 13:05
    
@Felix: Just for reference, there was a discussion on the zsh-workers list a month ago, resulting in a (improved?) function, which is based on auto-fu: Initial post: zsh.org/mla/workers/2013/msg00182.html, last release: zsh.org/mla/workers/2013/msg00194.html –  mpy Apr 1 '13 at 15:18
    
Too bad there isn't a way to disable the completion behavior for certain commands (auto-fu says it has this feature but it does not work). I use fasd/autojump (j "part of file path) to navigate between directories, and fasd/autojump become unusable with these autocompletion systems because of the completion style for fasd/autojump. –  Felix Apr 4 '13 at 17:15
1  
After some time trying both solutions out I stopped using them, they both have severe problems that make them unusable (terminals hang when typing long strings for example). –  Felix Apr 12 '13 at 20:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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