CVS: moonbase/crypto/openssh/profile.d ssh-completion.rc,NONE,1.1

Auke Kok sofar at lunar-linux.org
Fri Dec 5 19:58:22 GMT 2003


Update of /var/cvs/lunar/moonbase/crypto/openssh/profile.d
In directory dbguin.lunar-linux.org:/tmp/cvs-serv31921/profile.d

Added Files:
	ssh-completion.rc 
Log Message:
Adding tab completion for ssh since it's the best thing "since sliced bread" (quote Tauneutrino)


--- NEW FILE: ssh-completion.rc ---
# Turn on extended globbing
shopt -s extglob

# ssh hostname completion

_ssh ()
{
  local cur
  cur=${COMP_WORDS[COMP_CWORD]}
  COMPREPLY=( $( compgen -W "`cat $HOME/.ssh/known_hosts | cut -d' '  -f1 | sed 's:,: :g'`" $cur ) )
}
complete -F _ssh ssh





More information about the Lunar-commits mailing list