Skip to content

Commit

Permalink
add support for zsh shell
Browse files Browse the repository at this point in the history
  • Loading branch information
gWOLF3 committed Sep 15, 2020
1 parent 5c4a8b2 commit 4d4abfb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions local.sh → vissh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ if ! grep -qR "Include ~/.ssh/viSSHous" ~/.ssh/config
fi
OpenSSH-7.3

# workaround until OpenSSH 7.3 is widely adopted
if ! grep -qR 'alias ssh="ssh -F ~/.ssh/viSSHous"' ~/.bashrc
then echo 'alias ssh="ssh -F ~/.ssh/viSSHous"' >> ~/.bashrc && source ~/.bashrc
# workaround until OpenSSH 7.3 is more widely adopted
if ([ -f ~/.bashrc ] && ( ! grep -qR 'alias ssh="ssh -F ~/.ssh/viSSHous"' ~/.bashrc ));
then echo 'alias ssh="ssh -F ~/.ssh/viSSHous"' >> ~/.bashrc && bash
fi

if ([ -f ~/.zshrc ] && ( ! grep -qR 'alias ssh="ssh -F ~/.ssh/viSSHous"' ~/.zshrc ));
then echo 'alias ssh="ssh -F ~/.ssh/viSSHous"' >> ~/.zshrc && zsh
fi

echo "# last updated: $(date)" > ~/.ssh/viSSHous
Expand Down

0 comments on commit 4d4abfb

Please sign in to comment.