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
+3 -1
View File
@@ -1,7 +1,7 @@
# fish completion for ssr — System Sync & Restore.
# Install: drop into ~/.config/fish/completions/ssr.fish
set -l ssr_cmds install sync restore update schedule config completions status version help
set -l ssr_cmds install sync restore update schedule config completions status mackup version help
# True when no subcommand has been picked yet (only flags / option-args seen so far).
function __ssr_needs_subcmd
@@ -69,3 +69,5 @@ complete -c ssr -n '__ssr_using_subcmd update' -s n -l dry-run -d 'Preview with
complete -c ssr -n '__ssr_using_subcmd schedule' -a 'on off status'
complete -c ssr -n '__ssr_using_subcmd config' -a 'show edit path'
complete -c ssr -n '__ssr_using_subcmd completions' -a 'install uninstall status'
complete -c ssr -n __ssr_needs_subcmd -a mackup -d 'Manage Mackup app definitions'
complete -c ssr -n '__ssr_using_subcmd mackup' -a 'scan list clean'