2020-02-07 20:36:39 +00:00
|
|
|
<snippet>
|
|
|
|
<content><![CDATA[
|
|
|
|
from voussoirkit import betterhelp
|
|
|
|
|
|
|
|
DOCSTRING = '''
|
|
|
|
____my__program____
|
|
|
|
|
|
|
|
{____my__command____}
|
|
|
|
|
|
|
|
TO SEE DETAILS ON EACH COMMAND, RUN
|
|
|
|
> ____my__program____.py <command> --help
|
|
|
|
'''.lstrip()
|
|
|
|
|
|
|
|
SUB_DOCSTRINGS = dict(
|
|
|
|
____my__command____='''
|
|
|
|
____my__command____:
|
|
|
|
____my__command____description
|
|
|
|
|
|
|
|
> ____my__program____.py ____my__command____
|
|
|
|
|
|
|
|
flags:
|
|
|
|
--____my__flag____:
|
|
|
|
'''.strip(),
|
|
|
|
)
|
|
|
|
|
|
|
|
DOCSTRING = betterhelp.add_previews(DOCSTRING, SUB_DOCSTRINGS)
|
|
|
|
|
|
|
|
def main(argv):
|
2020-03-12 21:58:56 +00:00
|
|
|
return betterhelp.subparser_main(
|
|
|
|
argv,
|
|
|
|
parser,
|
|
|
|
main_docstring=DOCSTRING,
|
|
|
|
sub_docstrings=SUB_DOCSTRINGS,
|
|
|
|
)
|
2020-02-07 20:36:39 +00:00
|
|
|
|
|
|
|
]]></content>
|
|
|
|
<tabTrigger>helptext</tabTrigger>
|
|
|
|
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
|
|
|
|
<!-- <tabTrigger>hello</tabTrigger> -->
|
|
|
|
<!-- Optional: Set a scope to limit where the snippet will trigger -->
|
|
|
|
<!-- <scope>source.python</scope> -->
|
|
|
|
</snippet>
|