#alias:new clean_known_hosts e:cat fn clean_known_hosts [@_args]{ use str use moi/util/condition use moi/util/list use moi/util/ip fn less [cmp e1 e2]{ < ($cmp $e1 $e2) 0 } fn sort-host [e1 e2]{ local:i1 = (condition:set (ip:is-ip $e1) 1 0) local:i2 = (condition:set (ip:is-ip $e2) 1 0) if (!= $i1 $i2) { < $i1 $i2 } elif (== $i1 0) { ~/.ssh/known_hosts }