Commit 21f85deb authored by ∞'s avatar 💻


parent 2f323c91
......@@ -157,6 +157,7 @@ class Cli2ArgsException(Cli2Exception):
def help(*args):
Get help for a command.
......@@ -187,13 +188,14 @@ def help(*args):
yield Group.factory(importable.module.__name__).doc
def docfile(filepath):
Docstring for a file path.
cli2 docfile
cli2 docfile
if not os.path.exists(filepath):
raise Cli2Exception(f'{RED}{filepath}{RESET} not found')
......@@ -209,13 +211,16 @@ def docfile(filepath):
return docstring
docfile.cli2 = dict(color=RED)
def docmod(module_name):
"""Docstring for a module in dotted path.
Example: cli2 docmod cli2
return Group.factory(module_name).doc
def debug(callback, *args, **kwargs):
Dump parsed variables.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment