Last active
April 27, 2017 08:05
-
-
Save kenzo0107/06b3b1e202f36b70815cfe0207292a66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function peco-sshconfig-ssh() { | |
local host=$(grep 'Host ' ~/.ssh/config | awk '{print $2}' | peco) | |
if [ -n "$host" ]; then | |
echo "ssh -F ~/.ssh/config $host" | |
ssh -F ~/.ssh/config $host | |
fi | |
} | |
alias sshc='peco-sshconfig-ssh' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment