Skip to content

Instantly share code, notes, and snippets.

@mpiette
Created September 2, 2016 16:06
Show Gist options
  • Select an option

  • Save mpiette/fbe1d5af0da80bb629c7cf43ec7e2b69 to your computer and use it in GitHub Desktop.

Select an option

Save mpiette/fbe1d5af0da80bb629c7cf43ec7e2b69 to your computer and use it in GitHub Desktop.
ssh completion - known_hosts
# complete ssh from 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