Created
January 14, 2020 05:47
-
-
Save twinbird/ae2545ce2c05d22a7c43e298bebd905e to your computer and use it in GitHub Desktop.
This file contains 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
# append for .bash_profile | |
# bash-completion for ssh | |
function _compreply_ssh(){ | |
COMPREPLY=(`cat ~/.ssh/config | grep -i -e '^host' | cut -d " " -f 2 | grep -E "$2"`) | |
} | |
complete -F _compreply_ssh ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment