Created
May 7, 2013 08:42
-
-
Save nick-jonas/5531169 to your computer and use it in GitHub Desktop.
.bash_profile: tab completion for SSH hostnames on ~/.ssh/config
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 tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards | |
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment