feature: bash completes the vpn-* commands, their options and the names they take.
Release / release (push) Successful in 12s

This commit is contained in:
slawek committed 2026-10-26 11:35:46 +01:00
1 parent 8cac21845a
commit 81b7f4cac6
12 files changed
+459

No files matched your search

@@ -0,0 +1,24 @@
# bash completion for vpn-router-caddy -*- shell-script -*-
_vpn_router_caddy()
{
local cur prev words cword
_init_completion || return
# After the command only --help is left.
local word
for word in "${words[@]:1:cword-1}"; do
if [[ $word != -* ]]; then
[[ $cur == -* ]] && COMPREPLY=($(compgen -W '--help' -- "$cur"))
return
fi
done
if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '--json --help' -- "$cur"))
else
COMPREPLY=($(compgen -W 'status apply use-upstream' -- "$cur"))
fi
} &&
complete -F _vpn_router_caddy vpn-router-caddy
# ex: filetype=sh