]> id.pley.net Git - dotfiles.git/commitdiff
Fixed ssh-forget function to deal with possible space delimited entries.
authorJer Noble <jer.noble@apple.com>
Tue, 18 Feb 2014 17:57:48 +0000 (09:57 -0800)
committerJer Noble <jer.noble@apple.com>
Tue, 18 Feb 2014 17:57:48 +0000 (09:57 -0800)
zsh_aliases

index 1728fa30dc36d3856a8acf9fae7633aa624b4a1b..4338eefc23cd7086b3c5f7109f9271416e008f95 100644 (file)
@@ -67,11 +67,11 @@ if [[ $( has pidof ) == 'no'  ]]; then
 fi
 
 function ssh-forget() {
 fi
 
 function ssh-forget() {
-    sed -i "" "/^$1,/d" ~/.ssh/known_hosts
+    sed -i "" "/^$1[, ]/d" ~/.ssh/known_hosts
 }
 
 function ssh-learn() {
 }
 
 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
 }
 
     ssh-keyscan -t rsa $1 >> ~/.ssh/known_hosts
 }