Skip to content

Instantly share code, notes, and snippets.

@krets
Created July 13, 2015 18:15
Show Gist options
  • Save krets/7e429b46eea1fb6b9fbb to your computer and use it in GitHub Desktop.
Save krets/7e429b46eea1fb6b9fbb to your computer and use it in GitHub Desktop.
if [ -r ~/.ssh/known_hosts ]; then
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e 's/,.*//g' | uniq | grep -v "\["`;)" ssh
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment