# mussh(1) completion -*- shell-script -*- proc _mussh { var cur = '', prev = '', words = '', cword = '' _init_completion || return match $prev { with --help|-V|-m|-t return with -d setglobal COMPREPLY = '( '$( compgen -W '{0..2}' -- "$cur" ) ) return with -v setglobal COMPREPLY = '( '$( compgen -W '{0..3}' -- "$cur" ) ) return with -i|-H|-C _filedir return with -o|-po _xfunc ssh _ssh_options return with -l|-L setglobal COMPREPLY = '( '$( compgen -u -- "$cur" ) ) return with -s _shells return with -p|-h [[ $cur == *@* ]] && _user_at_host || _known_hosts_real -a $cur return with -c compopt -o filenames setglobal COMPREPLY = '( '$( compgen -c -- "$cur" ) ) return } [[ $cur != -* ]] || \ setglobal COMPREPLY = '( '$( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) } && complete -F _mussh mussh # ex: ts=4 sw=4 et filetype=sh