From effa434c0dcd3b563142fae85db75ccfd0c9cfbf Mon Sep 17 00:00:00 2001 From: Jer Noble Date: Tue, 18 Feb 2014 09:57:48 -0800 Subject: [PATCH 1/1] Fixed ssh-forget function to deal with possible space delimited entries. --- zsh_aliases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh_aliases b/zsh_aliases index 1728fa3..4338eef 100644 --- a/zsh_aliases +++ b/zsh_aliases @@ -67,11 +67,11 @@ if [[ $( has pidof ) == 'no' ]]; then fi function ssh-forget() { - sed -i "" "/^$1,/d" ~/.ssh/known_hosts + sed -i "" "/^$1[, ]/d" ~/.ssh/known_hosts } function ssh-learn() { - sed -i "" "/^$1,/d" ~/.ssh/known_hosts + sed -i "" "/^$1[, ]/d" ~/.ssh/known_hosts ssh-keyscan -t rsa $1 >> ~/.ssh/known_hosts } -- 2.40.1