Files
server/etc/bash_completion.d/plesk_repair_completion.bash
2026-01-08 18:34:49 +01:00

69 lines
2.5 KiB
Bash

_plesk_repair()
{
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
if [ $COMP_CWORD -eq 2 ]; then
COMPREPLY=( $( compgen -W "all installation db ftp fs web mail dns mysql mssql websites-diagnostic sysusers --help" -- $cur ) )
return 0
elif [ $COMP_CWORD -eq 3 ]; then
case "$prev" in
all)
COMPREPLY=( $( compgen -W " --help" -- $cur ) )
return 0
;;
installation)
COMPREPLY=( $( compgen -W "-y -verbose -json-output --help" -- $cur ) )
return 0
;;
db)
COMPREPLY=( $( compgen -W "-y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
ftp)
COMPREPLY=( $( compgen -W "-sys-users -y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
fs)
COMPREPLY=( $( compgen -W "-system -vhosts -y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
web)
COMPREPLY=( $( compgen -W "-domains-only -sslcerts -validate-configuration -server -php-handlers -apache-modules -php-fpm-configuration -y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
mail)
COMPREPLY=( $( compgen -W "-restore-configuration -only-domain-settings -y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
dns)
COMPREPLY=( $( compgen -W "-sync-zones -y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
mysql)
COMPREPLY=( $( compgen -W "-connection -databases -database-users -y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
mssql)
COMPREPLY=( $( compgen -W "-connection -databases -database-users -y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
websites-diagnostic)
COMPREPLY=( $( compgen -W " --help" -- $cur ) )
return 0
;;
sysusers)
COMPREPLY=( $( compgen -W "-y -n -verbose -json-output --help" -- $cur ) )
return 0
;;
--help)
COMPREPLY=( $( compgen -W "" -- $cur ) )
return 0
;;
esac
fi
}