Sweet bash ssh completion trick

|

Brian McCallister just posted the nicest
bash ssh completion trick
. Check it out:

#!/bin/sh
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

Yum!

About this Entry

This page contains a single entry by gozer published on February 8, 2005 1:03 AM.

HEAD revision of a remote subversion repository was the previous entry in this blog.

VMWare Server command-line tools to the rescue is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

  • uploaded

June 2008

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30