diff options
author | Florian Pritz <bluewind@xinu.at> | 2020-02-17 14:01:19 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2020-09-27 15:23:02 +0200 |
commit | 1798346ed6a879eb912969366473dd4f78fe404a (patch) | |
tree | a8ecaf73be8a5feddbaf192d20c52afb82a48ba5 | |
parent | 4e7a903a99e67fa97d29e54912df51aec9fa8ff5 (diff) | |
download | dotfiles-1798346ed6a879eb912969366473dd4f78fe404a.tar.gz dotfiles-1798346ed6a879eb912969366473dd4f78fe404a.tar.xz |
zshrc: Use absolute path to ssh known hosts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | .zshrc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -763,7 +763,7 @@ alias h=sshrc # complete ssh hostnames [[ -r ~/.ssh/known_hosts ]] && _ssh_hosts=(${${${${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}%%:*}#\[}%\]}) || _ssh_hosts=() -[[ -r ~/.ssh/known_hosts_work ]] && _ssh_hosts+=($(cut -d\ -f1 .ssh/known_hosts .ssh/known_hosts_work | tr , "\n" | sed -r 's#(_ecdsa|_rsa|_ed25519|_dsa)$##')) || true +[[ -r ~/.ssh/known_hosts_work ]] && _ssh_hosts+=($(cut -d\ -f1 ~/.ssh/known_hosts ~/.ssh/known_hosts_work | tr , "\n" | sed -r 's#(_ecdsa|_rsa|_ed25519|_dsa)$##')) || true [[ -r ~/.ssh/config ]] && _ssh_config_hosts=($(sed -rn 's/host\s+(.+)/\1/ip' "$HOME/.ssh/config" | grep -v "\*" )) || _ssh_config_hosts=() hosts=( $HOST |