You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.3 KiB

_ss_manager()
{
local cur prev opts
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --mtu --help --mptcp -i -l --manager-address --executable'
cur=${COMP_WORDS[COMP_CWORD]}
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "$prev" in
-c|-f|--executable)
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
;;
-s|-b|-l)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
;;
-L)
compopt -o nospace
_known_hosts_real -c -- "${cur}" || OMPREPLY=( $(compgen -A hostname -S : -- ${cur}) )
;;
-m)
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
;;
-a)
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
;;
-p|-k|-t|-n|--mtu)
;;
-i)
_available_interfaces -a || true
;;
--manager-address)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
_filedir || COMPREPLY+=( $(compgen -o plusdirs -f ${cur}) )
;;
*)
COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) )
;;
esac
return 0
}
complete -F _ss_manager ss-manager