From f10a8b403109e140e2be0c2b4af9819feb29b5f6 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 27 Jun 2019 10:46:05 +0200 Subject: zshrc: Remove _dsa suffix from host names Signed-off-by: Florian Pritz --- .zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index bd31feb..adfee01 100644 --- a/.zshrc +++ b/.zshrc @@ -690,7 +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/known_hosts_work ]] && _ssh_hosts+=(${${${${${${${(f)"$(sed -r 's#_(rsa|ed25519|ecdsa|dsa),#,#;' <$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 -- cgit v1.2.3-24-g4f1b