Skip to content

Instantly share code, notes, and snippets.

@dinks
Created November 10, 2013 16:50
Show Gist options
  • Save dinks/7400662 to your computer and use it in GitHub Desktop.
Save dinks/7400662 to your computer and use it in GitHub Desktop.
ssh autocomplete
SSH_COMPLETE=( $(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq) )
complete -o default -W "${SSH_COMPLETE[*]}" ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment