Created
March 30, 2017 18:33
-
-
Save JamesOBenson/cec1a89be43cfd59f312416a6d668d1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: http://hints.macworld.com/article.php?story=20100113142633883 | |
To have tab to complete from .ssh/config file in MacOS (Verified on MacOS 10.12.4), | |
vi ~/.bash_profile (New file) | |
# Copy and paste this line | |
complete -o default -o nospace -W "$(/usr/bin/env ruby -ne 'puts $_.split(/[,\s]+/)[1..-1].reject{|host| host.match(/\*|\?/)} if $_.match(/^\s*Host\s+/);' < $HOME/.ssh/config)" scp sftp ssh | |
source ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment