mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-31 06:23:52 +00:00
Updated bash completion (#1284)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
_ss_local()
|
||||
{
|
||||
local cur prev opts ciphers
|
||||
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --fast-open --mtu --help --mptcp -i --acl -l'
|
||||
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
|
||||
opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -v -h --reuse-port --fast-open --acl --mtu --mptcp --key --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
|
||||
-c|-f|--acl)
|
||||
-f|-c|--acl)
|
||||
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
|
||||
;;
|
||||
-s|-b)
|
||||
@@ -18,7 +18,7 @@ _ss_local()
|
||||
-a)
|
||||
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
|
||||
;;
|
||||
-p|-k|-t|-n|--mtu|-l)
|
||||
-p|-l|-k|-t|-n|--mtu|--key|--plugin|--plugin-opts)
|
||||
;;
|
||||
-i)
|
||||
_available_interfaces -a || true
|
||||
|
||||
@@ -1,28 +1,24 @@
|
||||
_ss_manager()
|
||||
{
|
||||
local cur prev opts ciphers
|
||||
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --mtu --help --mptcp -i -l --manager-address --executable'
|
||||
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
|
||||
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
|
||||
-c|-f|--executable)
|
||||
-f|-c|--executable)
|
||||
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
|
||||
;;
|
||||
-s|-b)
|
||||
_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|-l)
|
||||
-p|-l|-k|-t|-n|--mtu|--plugin|--plugin-opts)
|
||||
;;
|
||||
-i)
|
||||
_available_interfaces -a || true
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
_ss_redir()
|
||||
{
|
||||
local cur prev opts ciphers
|
||||
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
|
||||
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --mtu --help --mptcp -l'
|
||||
opts='-s -p -l -k -m -a -f -t -c -n -b -u -U -v -h --reuse-port --mtu --mptcp --key --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
|
||||
-c|-f)
|
||||
-f|-c)
|
||||
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
|
||||
;;
|
||||
-s|-b)
|
||||
@@ -18,7 +18,7 @@ _ss_redir()
|
||||
-a)
|
||||
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
|
||||
;;
|
||||
-p|-k|-t|-n|--mtu|-l)
|
||||
-p|-l|-k|-t|-n|--mtu|--key|--plugin|--plugin-opts)
|
||||
;;
|
||||
*)
|
||||
COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
_ss_server()
|
||||
{
|
||||
local cur prev opts ciphers
|
||||
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --fast-open --mtu --help --mptcp -i -6 -d --manager-address --acl'
|
||||
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
|
||||
opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -6 -d -v -h --reuse-port --fast-open --acl --manager-address --mtu --mptcp --key --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'
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case "$prev" in
|
||||
-c|-f|--acl)
|
||||
-f|-c|--acl)
|
||||
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
|
||||
;;
|
||||
-s|-b)
|
||||
@@ -19,7 +19,7 @@ _ss_server()
|
||||
-a)
|
||||
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
|
||||
;;
|
||||
-p|-k|-t|-n|--mtu|-d)
|
||||
-p|-l|-k|-t|-n|-d|--mtu|--key|--plugin|--plugin-opts)
|
||||
;;
|
||||
--manager-address)
|
||||
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
_ss_tunnel()
|
||||
{
|
||||
local cur prev opts ciphers
|
||||
ciphers='rc4-md5 table rc4 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb cast5-cfb des-cfb idea-cfb rc2-cfb seed-cfb salsa20 chacha20 and chacha20-ietf'
|
||||
opts='-s -b -p -k -f -t -m -c -a -n -u -U -v -h -A --mtu --help --mptcp -i -l -L'
|
||||
opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -L -v -h --reuse-port --mtu --mptcp --key --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]}"
|
||||
compopt +o nospace
|
||||
case "$prev" in
|
||||
-c|-f)
|
||||
-f|-c)
|
||||
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
|
||||
;;
|
||||
-s|-b)
|
||||
@@ -23,7 +23,7 @@ _ss_tunnel()
|
||||
-a)
|
||||
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
|
||||
;;
|
||||
-p|-k|-t|-n|--mtu|-l)
|
||||
-p|-l|-k|-t|-n|--mtu|--key|--plugin|--plugin-opts)
|
||||
;;
|
||||
-i)
|
||||
_available_interfaces -a || true
|
||||
|
||||
Reference in New Issue
Block a user