mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 14:20:12 +08:00

Reordering the `getent hosts` and read from `/etc/hosts` combined with minimizing shelling and job invocations for parsing the output results in a profiled and benchmarked ~42% decrease in the time it takes to run, and that's on a machine with a very small hosts list in the first place. This update also fixes the hadling of IPv6 addresses in the hosts output, which were previously ignored, and ignores 127.* loopback addresses in addition to the 0.0.0.0 address (plus adds support for shorter IPv4 notations).