From 27e32faa47e6006fba524870d042bdbe2ef6ab85 Mon Sep 17 00:00:00 2001 From: Atrate Date: Sat, 4 Dec 2021 13:22:12 +0100 Subject: [PATCH] zshrc: ignore hosts set to invalid/loopback addresses for $_etc_hosts Signed-off-by: Atrate --- etc/zsh/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 89684e4..22ed162 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -894,7 +894,7 @@ function grmlcomp () { if is42 ; then [[ -r ~/.ssh/config ]] && _ssh_config_hosts=(${${(s: :)${(ps:\t:)${${(@M)${(f)"$(<$HOME/.ssh/config)"}:#Host *}#Host }}}:#*[*?]*}) || _ssh_config_hosts=() [[ -r ~/.ssh/known_hosts ]] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=() - [[ -r /etc/hosts ]] && [[ "$NOETCHOSTS" -eq 0 ]] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(