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.
37 lines
1.4 KiB
37 lines
1.4 KiB
_ss_manager()
|
|
{
|
|
local cur prev opts ciphers
|
|
opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -v -h --reuse-port --manager-address --executable --mtu --mptcp --plugin --plugin-opts --help'
|
|
ciphers='rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf'
|
|
cur=${COMP_WORDS[COMP_CWORD]}
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
case "$prev" in
|
|
-f|-c|--executable)
|
|
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
|
|
;;
|
|
-s|-b)
|
|
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
|
|
;;
|
|
-m)
|
|
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
|
|
;;
|
|
-a)
|
|
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
|
|
;;
|
|
-p|-l|-k|-t|-n|--mtu|--plugin|--plugin-opts)
|
|
;;
|
|
-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
|