X-Git-Url: https://git.madduck.net/etc/ssh.git/blobdiff_plain/9d4b628328aa275e7631465e4e548d921df75f4f..ec4f7447c6e64015181939ab241d3a56ff8cff0b:/.zsh/zshrc/parts.d/50_ssh?ds=inline diff --git a/.zsh/zshrc/parts.d/50_ssh b/.zsh/zshrc/parts.d/50_ssh index 8daa9df..eb57f74 100644 --- a/.zsh/zshrc/parts.d/50_ssh +++ b/.zsh/zshrc/parts.d/50_ssh @@ -5,23 +5,22 @@ # Copyright © 2008 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # -# Source repository: http://git.madduck.net/v/etc/zsh.git +# Source repository: git://git.madduck.net/etc/ssh.git # # populate hosts completion with SSH's known_hosts if [ -r $HOME/.ssh/known_hosts ]; then local _myhosts - _myhosts=(${${${${(f)"$(cat $HOME/.ssh/known_hosts.d/*(.N))"}:#[0-9]*}%%\ *}%%,*}) + _myhosts=(${${${${(f)"$(cat $HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*}) zstyle ':completion:*' hosts $_myhosts unset _myhosts fi -_NEW_KNOWN_HOSTS=~/.ssh/known_hosts.NEW +local _NEW_KNOWN_HOSTS=~/.ssh/known_hosts.NEW alias ssh="{ [[ -f $_NEW_KNOWN_HOSTS ]] && warn $_NEW_KNOWN_HOSTS exists }; command ssh" alias sshnew="ssh -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile $_NEW_KNOWN_HOSTS'" alias scpnew="scp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile $_NEW_KNOWN_HOSTS'" alias sshtmp="ssh -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null'" alias scptmp="scp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null'" -unset _NEW_KNOWN_HOSTS # vim:ft=zsh