8

Zsh's completion feature is great except for this one. When I try to complete in a folder with lots of files/network folder, it takes a couple of minutes and prints this error.

example.com:~$ ls /path/to/some/bigFolder/[TAB]
zsh: do you wish to see all 620 possibilities (124 lines)?

Instead Is there a way to specify a timeout after which zsh should not try to auto-complete? I am not able to cancel its search too.

1
  • 1
    +1 Great question. I'd be curious about the same in bash. Feb 22, 2012 at 11:02

2 Answers 2

3

Ctrl-C should cancel the completion. If it doesn't, then there's little chance anything else would.

-1

You can write a custom completer, implementing a timer/timeout, from the zsh FAQ, section 4
4.5: How do I get started with programmable completion?

Paraphrasing the FAQ

The main resource is the zshcompsys manual page.
... or copy one of the very many existing functions.

4
  • so I should re-write whole completion system for a timeout feature? Has anyone done that already?
    – balki
    Feb 22, 2012 at 14:35
  • not rewrite, customize. And, iff you cannot find "one of the very many existing functions"
    – bsd
    Feb 22, 2012 at 17:07
  • how many files do you have in one directory? Are you calling compinit in your .zshrc file?
    – bsd
    Feb 22, 2012 at 17:09
  • This answer would be useful if you showed how to customize the completion system to have a timeout. I don't see a relevant zstyle setting in the zshcompsys man page. In fact, I doubt it is possible: I don't think you can interrupt zsh while it's expanding a glob, which is what is blocking here. Feb 23, 2012 at 2:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .