//View Tip #312
Similar Tips
» Check low space
» .. revisited
» Truncated $PWD in the command prompt
» Close shell keeping all subprocess running
» Find files greater than a certain size

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
SSH_COMPLETE=( $(cat ~/.ssh/known_hosts | \
                 cut -f 1 -d ' ' | \
                 sed -e s/,.*//g | \
                 uniq | \
                 egrep -v [0123456789]) )
complete -o default -W "${SSH_COMPLETE[*]}" ssh


View Comments »




Comments 

Add your comment

Comments are currently disabled
jerbear
This will not work on most systems as the known_hosts file is now stored in such a way that you can not get hostnames from it.
Posted 2008-09-17 13:56:45

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit