feat(docs): implement slice 8 documentation triad, man page, completions and Gitea Actions CI/CD
Build and Publish Release / test-and-release (push) Failing after 48s

This commit is contained in:
soda64 committed 2026-10-09 20:22:51 +02:00
1 parent c5c3b87bd9
commit 6f23f14b76
14 files changed
+1730 -10

No files matched your search

+17
View File
@@ -784,8 +784,23 @@ def build_parser() -> argparse.ArgumentParser:
verify_parser.add_argument("snapshot_id", help="Snapshot ID or archive filename to verify")
verify_parser.add_argument("--target-dir", default=DEFAULT_BACKUP_DIR, help="Directory containing the snapshot")
# Completion command
comp_parser = subparsers.add_parser("completion", help="Generate shell autocompletion script (bash or zsh)", parents=[common_parser])
comp_parser.add_argument("shell", choices=["bash", "zsh"], help="Target shell (bash or zsh)")
return parser
def handle_completion(args: argparse.Namespace) -> int:
"""Generate shell autocompletion script."""
from linux_backuper.core.completions import generate_completion
try:
script = generate_completion(args.shell)
sys.stdout.write(script)
return EXIT_SUCCESS
except ValueError as e:
sys.stderr.write(f"[ERROR] {e}\n")
return EXIT_GENERIC_ERROR
def main(argv: Optional[List[str]] = None) -> int:
"""Main CLI entrypoint."""
parser = build_parser()
@@ -813,6 +828,8 @@ def main(argv: Optional[List[str]] = None) -> int:
return handle_push(args)
elif args.subcommand == "verify":
return handle_verify(args)
elif args.subcommand == "completion":
return handle_completion(args)
return EXIT_SUCCESS