//View Tip #312
» User input timeout
» Print part of a file
» Alter autocompletion settings
» CDPATH
jerbear
Similar Tips
» Vi mode in bash» User input timeout
» Print part of a file
» Alter autocompletion settings
» CDPATH
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[*]}" sshComments
Add your comment
Comments are currently disabled
#1
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

