summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2010-01-23 23:46:48 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2010-01-23 23:46:48 +0000
commitfca61e27db5bf403b44693c57e5c6d471cc91620 (patch)
tree02f6b511ee2430c1deb35ed891badc0b308003b1 /zshrc
parent1c1ec7cfeb199a96f22e8ff5f52420397dcf4f82 (diff)
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
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc9
1 files changed, 7 insertions, 2 deletions
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'