innernet/doc/innernet-server.completions...

509 lines
17 KiB
Bash
Raw Permalink Normal View History

_innernet-server() {
local i cur prev opts cmd
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd=""
opts=""
for i in ${COMP_WORDS[@]}
do
case "${cmd},${i}" in
",$1")
2022-01-11 20:18:19 +00:00
cmd="innernet__server"
;;
innernet__server,add-cidr)
cmd="innernet__server__add__cidr"
;;
innernet__server,add-peer)
cmd="innernet__server__add__peer"
;;
innernet__server,completions)
cmd="innernet__server__completions"
;;
innernet__server,delete-cidr)
cmd="innernet__server__delete__cidr"
;;
innernet__server,disable-peer)
cmd="innernet__server__disable__peer"
2022-09-24 04:16:35 +00:00
;;
innernet__server,enable-peer)
cmd="innernet__server__enable__peer"
2022-09-24 04:16:35 +00:00
;;
innernet__server,help)
cmd="innernet__server__help"
;;
innernet__server,new)
cmd="innernet__server__new"
;;
innernet__server,rename-peer)
cmd="innernet__server__rename__peer"
2021-05-31 15:23:14 +00:00
;;
innernet__server,serve)
cmd="innernet__server__serve"
;;
innernet__server,uninstall)
cmd="innernet__server__uninstall"
;;
innernet__server__help,add-cidr)
cmd="innernet__server__help__add__cidr"
;;
innernet__server__help,add-peer)
cmd="innernet__server__help__add__peer"
;;
innernet__server__help,completions)
cmd="innernet__server__help__completions"
;;
innernet__server__help,delete-cidr)
cmd="innernet__server__help__delete__cidr"
;;
innernet__server__help,disable-peer)
cmd="innernet__server__help__disable__peer"
;;
innernet__server__help,enable-peer)
cmd="innernet__server__help__enable__peer"
;;
innernet__server__help,help)
cmd="innernet__server__help__help"
;;
innernet__server__help,new)
cmd="innernet__server__help__new"
;;
innernet__server__help,rename-peer)
cmd="innernet__server__help__rename__peer"
;;
innernet__server__help,serve)
cmd="innernet__server__help__serve"
;;
innernet__server__help,uninstall)
cmd="innernet__server__help__uninstall"
;;
*)
;;
esac
done
case "${cmd}" in
2022-01-11 20:18:19 +00:00
innernet__server)
opts="-c -d -h -V --config-dir --data-dir --no-routing --backend --mtu --help --version new uninstall serve add-peer disable-peer enable-peer rename-peer add-cidr delete-cidr completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
2021-12-05 17:35:18 +00:00
--config-dir)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
2022-01-11 20:18:19 +00:00
-c)
2021-12-05 17:35:18 +00:00
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--data-dir)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
2022-01-11 20:18:19 +00:00
-d)
2021-12-05 17:35:18 +00:00
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--backend)
2022-09-24 04:16:35 +00:00
COMPREPLY=($(compgen -W "kernel userspace" -- "${cur}"))
return 0
;;
2021-06-14 14:53:02 +00:00
--mtu)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__add__cidr)
2022-01-11 20:18:19 +00:00
opts="-h --name --cidr --parent --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--cidr)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--parent)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__add__peer)
2022-01-11 20:18:19 +00:00
opts="-h --name --ip --auto-ip --cidr --admin --yes --save-config --invite-expires --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--ip)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--cidr)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--admin)
COMPREPLY=($(compgen -W "true false" -- "${cur}"))
return 0
;;
--save-config)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--invite-expires)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__completions)
2022-01-11 20:18:19 +00:00
opts="-h --help bash elvish fish powershell zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__delete__cidr)
2022-01-11 20:18:19 +00:00
opts="-h --name --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
2022-09-24 04:16:35 +00:00
innernet__server__disable__peer)
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__enable__peer)
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help)
opts="new uninstall serve add-peer disable-peer enable-peer rename-peer add-cidr delete-cidr completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__add__cidr)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__add__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__completions)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__delete__cidr)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__disable__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__enable__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__help)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__new)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__rename__peer)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__serve)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__help__uninstall)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__new)
2022-01-11 20:18:19 +00:00
opts="-h --network-name --network-cidr --external-endpoint --auto-external-endpoint --listen-port --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--network-name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--network-cidr)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--external-endpoint)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--listen-port)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
2021-05-31 15:23:14 +00:00
innernet__server__rename__peer)
2022-01-11 20:18:19 +00:00
opts="-h --name --new-name --yes --help <INTERFACE>"
2021-05-31 15:23:14 +00:00
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--new-name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__serve)
2022-01-11 20:18:19 +00:00
opts="-h --no-routing --backend --mtu --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--backend)
2022-09-24 04:16:35 +00:00
COMPREPLY=($(compgen -W "kernel userspace" -- "${cur}"))
return 0
;;
2021-06-14 14:53:02 +00:00
--mtu)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__uninstall)
2022-09-24 04:16:35 +00:00
opts="-h --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
esac
}
complete -F _innernet-server -o bashdefault -o default innernet-server