Created
September 12, 2011 21:37
-
-
Save kurisuchan/1212527 to your computer and use it in GitHub Desktop.
Turn on Bash SSH completion
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
# To be added to your favorite bash config file | |
_compssh () | |
{ | |
cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=($(compgen -W "$(sed 's/[,| ].*$//' ~/.ssh/known_hosts)" -- $cur)) | |
} | |
complete -F _compssh ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment