Commit b4216bf5 authored by ∞'s avatar 💻

Support custom parser

parent a2daaa02
Pipeline #5753 passed with stages
in 1 minute and 31 seconds
......@@ -110,6 +110,8 @@ class Group(Callable, BaseGroup):
class ConsoleScript(BaseGroup):
Parser = Parser
def __init__(self, doc=None, argv=None, default_command='help'):
ConsoleScript.singleton = self
argv = argv if argv is not None else sys.argv
......@@ -121,10 +123,11 @@ class ConsoleScript(BaseGroup):
def __call__(self):
ConsoleScript.singleton = self
self.parser = Parser(self.argv[1:], self)
self.parser = self.Parser(self.argv[1:], self)
if not os.getenv('CLI2_COLOR_DISABLE'):
result = None
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