Skip to content

Instantly share code, notes, and snippets.

@jasonmoo
Created October 29, 2014 14:49
Show Gist options
  • Save jasonmoo/852bf1749e8cb9874744 to your computer and use it in GitHub Desktop.
Save jasonmoo/852bf1749e8cb9874744 to your computer and use it in GitHub Desktop.
autocomplete your ssh hosts for osx
function complete_host() { grep "^Host $2" ~/.ssh/config | grep -v \* | cut -d\ -f2; }
complete -o nospace -C complete_host ssh scp csshX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment