1 2 3
# Bash Completions for SSH known_hosts and config hostscomplete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" sshcomplete -W "$(echo `cat ~/.ssh/config | cut -f1,2 -d ' ' | sed -e 's/Host[^s+]//g; s/^ *//; s/ *$//; /#.*/d' -e '/^$/d' | uniq`;)" ssh
# A handy way to display lists from collection def list(stuff, options = {}, &block) return content_tag(:p, "None") if stuff.nil? || stuff.empty?