From: Alexander Barton Date: Fri, 10 Jul 2015 00:15:58 +0000 (+0200) Subject: ssh: Move ssh wrapper initialization to new ssh.zprofile X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=4dff55dd277354f42e2fa12ed55d6a9104ca81e4 ssh: Move ssh wrapper initialization to new ssh.zprofile --- diff --git a/plugins/ssh/ssh.zprofile b/plugins/ssh/ssh.zprofile new file mode 100644 index 0000000..4c803fe --- /dev/null +++ b/plugins/ssh/ssh.zprofile @@ -0,0 +1,13 @@ +# AX-ZSH: Alex' Modular ZSH Configuration +# ssh.zprofile: Setup (Open-) SSH + +# Make sure that "ssh(1)" is installed +(( $+commands[ssh] )) || return + +unset ssh_cmd +(( $+commands[ssh-q] )) && ssh_cmd="ssh-q" +(( $+commands[ssh-wrapper] )) && ssh_cmd="ssh-wrapper" +if [[ -n "$ssh_cmd" ]]; then + export GIT_SSH="$ssh_cmd" +fi +unset ssh_cmd diff --git a/plugins/ssh/ssh.zshrc b/plugins/ssh/ssh.zshrc index fcc9682..c63985b 100644 --- a/plugins/ssh/ssh.zshrc +++ b/plugins/ssh/ssh.zshrc @@ -19,11 +19,3 @@ ssh_hostname_prompt() { } ax_hostname_prompt_functions=($ax_hostname_prompt_functions ssh_hostname_prompt) - -unset ssh_cmd -(( $+commands[ssh-q] )) && ssh_cmd="ssh-q" -(( $+commands[ssh-wrapper] )) && ssh_cmd="ssh-wrapper" -if [[ -n "$ssh_cmd" ]]; then - export GIT_SSH="$ssh_cmd" -fi -unset ssh_cmd