summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zshrc1
1 files changed, 1 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index 358e8ae..bd31feb 100644
--- a/.zshrc
+++ b/.zshrc
@@ -690,6 +690,7 @@ compdef sshrc=ssh
# complete ssh hostnames
[[ -r ~/.ssh/known_hosts ]] && _ssh_hosts=(${${${${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}%%:*}#\[}%\]}) || _ssh_hosts=()
+[[ -r ~/.ssh/known_hosts_work ]] && _ssh_hosts+=(${${${${${${${(f)"$(sed -r 's#_(rsa|ed25519|ecdsa),#,#;' <$HOME/.ssh/known_hosts_work)"}:#[\|]*}%%\ *}%%,*}%%:*}#\[}%\]}) || true
[[ -r ~/.ssh/config ]] && _ssh_config_hosts=($(sed -rn 's/host\s+(.+)/\1/ip' "$HOME/.ssh/config" | grep -v "\*" )) || _ssh_config_hosts=()
hosts=(
$HOST