From: Jörg Behrmann Date: Mon, 30 Sep 2024 13:22:41 +0000 (+0200) Subject: docs: Add man page shortcuts X-Git-Tag: v25~253^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3082%2Fhead;p=thirdparty%2Fmkosi.git docs: Add man page shortcuts --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index b12fd0fcc..a4e55be5d 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4226,7 +4226,14 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: return print_completion(args, resources=resources) if args.verb == Verb.documentation: - manual = args.cmdline[0] if args.cmdline else "mkosi" + if args.cmdline: + manual = { + "initrd": "mkosi-initrd", + "sandbox": "mkosi-sandbox", + "news": "mkosi.news", + }.get(args.cmdline[0], args.cmdline[0]) + else: + manual = "mkosi" formats: list[DocFormat] = ( [args.doc_format] if args.doc_format != DocFormat.auto else DocFormat.all() )