Skip to content

Commit

Permalink
Add link to the official doc on -h
Browse files Browse the repository at this point in the history
Signed-off-by: Dramelac <[email protected]>
  • Loading branch information
Dramelac committed Jul 8, 2024
1 parent c4c477d commit efaed58
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions exegol/utils/argParse.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import argparse
import argcomplete
from logging import CRITICAL
from typing import IO, Optional, List, Union, Dict, cast

import argcomplete

from exegol.console.cli.actions.Command import Command, Option
from exegol.utils.ExeLog import logger

Expand All @@ -19,8 +20,9 @@ def _print_message(self, message: str, file: Optional[IO[str]] = None) -> None:
class Parser:
"""Custom Exegol CLI Parser. Main controller of argument building and parsing."""

__description = "This Python script is a wrapper for Exegol. It can be used to easily manage Exegol on " \
"your machine."
__description = """This Python script is a wrapper for Exegol. It can be used to easily manage Exegol on your machine.
[red]Official documentation[/red]: https://exegol.rtfd.io"""
__formatter_class = argparse.RawTextHelpFormatter

def __init__(self, actions: List[Command]):
Expand Down Expand Up @@ -54,7 +56,9 @@ def __set_action_parser(self) -> None:
# the 'help' description of the current action is retrieved
# from the comment of the corresponding action class
sub_parser = self.subParser.add_parser(action.name, help=action.__doc__,
description=action.__doc__,
description=action.__doc__ + f"""
[red]Official documentation[/red]: https://exegol.rtfd.io/en/latest/exegol-wrapper/{action.name}.html""",
epilog=action.formatEpilog(),
formatter_class=self.__formatter_class)
sub_parser.set_defaults(action=action)
Expand Down

0 comments on commit efaed58

Please sign in to comment.