Skip to content

Instantly share code, notes, and snippets.

@nick-jonas
Created May 7, 2013 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nick-jonas/5531169 to your computer and use it in GitHub Desktop.
Save nick-jonas/5531169 to your computer and use it in GitHub Desktop.
.bash_profile: tab completion for SSH hostnames on ~/.ssh/config
# 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