//View Tip #312
» Truncated $PWD in the command prompt
» Counts files in the current directory and subdirectory
» Fix the previous command
» Remove or delete columns from a csv file
jerbear
Similar Tips
» Print part of a file» Truncated $PWD in the command prompt
» Counts files in the current directory and subdirectory
» Fix the previous command
» Remove or delete columns from a csv file
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
#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

