From fca61e27db5bf403b44693c57e5c6d471cc91620 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 23 Jan 2010 23:46:48 +0000 Subject: parse all known hosts files, enable "l" alias again git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@440 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- zshrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'zshrc') diff --git a/zshrc b/zshrc index f62d882..e46d33a 100644 --- a/zshrc +++ b/zshrc @@ -166,8 +166,12 @@ zmodload -i zsh/complist zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} hosts="" -if [ -e $HOME/.ssh/known_hosts ]; then - hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*}) +for f in "$HOME/.ssh/known_hosts" "$HOME/.ssh/known_hosts2" "/etc/ssh/ssh_known_hosts"; do + if [ -e "$f" ]; then + hosts=($hosts ${${${${(f)"$(<"$f")"}:#[0-9]*}%%\ *}%%,*}) + fi +done +if [ -n "$hosts" ]; then zstyle ':completion:*:hosts' hosts $hosts fi @@ -190,6 +194,7 @@ if [ "$SYSTEM" = "Linux" ] ; then fi alias cp='cp -i' alias mv='mv -i' +alias l='ls -l' alias mmv='noglob mmv' -- cgit v1.2.3