From 1971c3aaf0b3e06f7c2580afa1041250041d8a71 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Fri, 2 Nov 2012 11:25:58 +0200 Subject: [PATCH] Added documentation for ssh-alias --- modules/ssh-alias/README.md | 13 +++++++++++++ modules/ssh-alias/init.zsh | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 modules/ssh-alias/README.md diff --git a/modules/ssh-alias/README.md b/modules/ssh-alias/README.md new file mode 100644 index 00000000..d552dd65 --- /dev/null +++ b/modules/ssh-alias/README.md @@ -0,0 +1,13 @@ +SSH Alias +========= + +Create aliases for connecting to hosts defined in the local ~/.ssh/config file + +Usage +----- +Load the module in your zpreztorc file. An alias will be created for each host defined in your ~/.ssh/config file. +In order to connect to a host, you just need to type its host name as it appears in ~/.ssh/config + +Authors +------- + - [Roey Darwish Dror](https://github.com/r-darwish) diff --git a/modules/ssh-alias/init.zsh b/modules/ssh-alias/init.zsh index 61b7bce0..ec777e19 100644 --- a/modules/ssh-alias/init.zsh +++ b/modules/ssh-alias/init.zsh @@ -1,3 +1,10 @@ +# +# Create aliases for hosts defined in ~/.ssh/config +# +# Authors: +# Roey Darwish Dror +# + local x for x in $(grep 'Host ' ~/.ssh/config | awk '{ print $2 }'); do alias $x="ssh $x"