Commit b4216bf5 authored by jpic ∞'s avatar jpic ∞ 💾
Browse files

Support custom parser

parent a2daaa02
......@@ -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