refactor: consolidate restore under backup command
mcpctl backup restore list/diff/to instead of separate mcpctl restore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ _mcpctl() {
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
local commands="status login logout config get describe delete logs create edit apply patch backup restore approve console cache"
|
||||
local commands="status login logout config get describe delete logs create edit apply patch backup approve console cache"
|
||||
local project_commands="get describe delete logs create edit attach-server detach-server"
|
||||
local global_opts="-v --version --daemon-url --direct -p --project -h --help"
|
||||
local resources="servers instances secrets templates projects users groups rbac prompts promptrequests serverattachments proxymodels all"
|
||||
@@ -235,7 +235,7 @@ _mcpctl() {
|
||||
backup)
|
||||
local backup_sub=$(_mcpctl_get_subcmd $subcmd_pos)
|
||||
if [[ -z "$backup_sub" ]]; then
|
||||
COMPREPLY=($(compgen -W "log key help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "log key restore help" -- "$cur"))
|
||||
else
|
||||
case "$backup_sub" in
|
||||
log)
|
||||
@@ -244,27 +244,9 @@ _mcpctl() {
|
||||
key)
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
;;
|
||||
*)
|
||||
restore)
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
return ;;
|
||||
restore)
|
||||
local restore_sub=$(_mcpctl_get_subcmd $subcmd_pos)
|
||||
if [[ -z "$restore_sub" ]]; then
|
||||
COMPREPLY=($(compgen -W "list diff to help" -- "$cur"))
|
||||
else
|
||||
case "$restore_sub" in
|
||||
list)
|
||||
COMPREPLY=($(compgen -W "-n --limit -h --help" -- "$cur"))
|
||||
;;
|
||||
diff)
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
;;
|
||||
to)
|
||||
COMPREPLY=($(compgen -W "--force -h --help" -- "$cur"))
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user