feat: ssr mackup scan|list|clean — on-demand cfg generation with confirmation

Instead of silently writing ~/.mackup/ssr-*.cfg on every sync, generation
is now an explicit opt-in command: ssr mackup scan

  ssr mackup scan   — dry-run: shows NEW/UPD/DEL changes, prompts before writing
  ssr mackup list   — list existing generated files
  ssr mackup clean  — remove all generated files (with confirmation)

ssr sync no longer calls generate_custom_cfg automatically.
Completions updated for zsh, bash, fish.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-12 13:39:17 +02:00
parent 3e54f0ca20
commit 36d4941c95
6 changed files with 235 additions and 9 deletions
+4 -1
View File
@@ -13,7 +13,7 @@ _ssr() {
cword=$COMP_CWORD
fi
local commands="install sync restore update schedule config completions status version help"
local commands="install sync restore update schedule config completions status mackup version help"
local global_flags="-c --config -h --help"
# Detect command (first non-flag word after `ssr`).
@@ -60,6 +60,9 @@ _ssr() {
completions)
COMPREPLY=( $(compgen -W "install uninstall status" -- "$cur") )
;;
mackup)
COMPREPLY=( $(compgen -W "scan list clean" -- "$cur") )
;;
*)
COMPREPLY=()
;;