-
-
Save The1andONLYdave/3aee32d4e7b1059b6f22e6b0217bf550 to your computer and use it in GitHub Desktop.
Bash AutoComplete from known_hosts
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
# add to ~/.bash_profile, and close/reopen a shell. Will autocomplete any hosts found in known_hosts. | |
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment