Brian's Waste of Time

Mon, 07 Feb 2005

Bash Completion for SSH

Cleaned up my bash commpletion for ssh some, figured I'd put it up so can people can show me what they have that's better ;-)

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

You can drop the final egrep -v [0123456789] if you regularly ssh to ip addresses =)

3 writebacks [/tech] permanent link

Jamis Gone Wild!

Jamis Buck has been going crazy lately. The pure-ruby ssh client library is pretty slick. All that said, the docs he's produced are the slickest part. Cannot understate the importance of documentation =)

Of course, I am also waiting for this announcement. Ah, the pain of using incrementing ids from sequences ;-)

0 writebacks [/src/ruby] permanent link