`compinit -i` doesn't always change zcompdump, which means that the
`compinit -C` condition fails to run until the completions change.
When we `compinit -i`, we should touch the file too to solve this.
- Add missing documentation for options and environment variables
- Rearrange definition and documentation of 'Options', 'Variables'
and 'Aliases' in a consistent order
By keeping the variable `_etc_host_ignores` around, it can be resolved
lazily which is turn should allow selective ignores on a per invocation
basis.
Also, `'\#'` doesn't need to be added to `_etc_host_ignores` anymore.
It is enforced inline.
Entries from static '/etc/hosts' can now be ignored via 'zstyle' based
configuration. Both IP address and corresponding hostname will be ignored
during host completion. However, some of the entries ignored from '/etc/hosts'
still might appear during completion because of their presence in 'ssh'
configuration ('~/.ssh/config') or history ('~/.ssh/ssh_hosts',
'~/.ssh/known_hosts' etc.).
Usage of `(( ... ))` over `[[ ... ]]` is preferred for arithmetic expression
since the former is less error prone.
Also, unset local variable whenever possible.
The original idea was by @samjonester in #1210. This version aims to avoid
relying on the stat or date programs because they have different flags depending
on the OS and if it uses BSD or GNU coreutils.
7 is pretty arbitrarily chosen, but seems like a reasonable tradeoff, at
least the completion no longer shows symptoms of exponential
time-growth when trying to complete something completely wrong.
This fixes#946.