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
+7
View File
@@ -15,6 +15,7 @@ _ssr() {
'config:Show or edit the active config file'
'completions:Install or remove shell completions'
'status:Show last sync time, cloud target, schedule state'
'mackup:Manage auto-generated Mackup app definitions'
'version:Print version'
'help:Show top-level help'
)
@@ -59,6 +60,12 @@ _ssr() {
'uninstall[Remove shell completions]' \
'status[Show installed completions]'
;;
mackup)
_values 'mackup action' \
'scan[Suggest and confirm ssr-*.cfg files]' \
'list[List generated ssr-*.cfg files]' \
'clean[Remove all generated ssr-*.cfg files]'
;;
esac
;;
esac