File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ def cli_launcher() -> None:
1616 shorthands then call wdoc"""
1717 sysline = " " .join (sys .argv )
1818
19+ # turn 'wdoc parse' into 'wdoc_parse_file'
20+ if "wdoc parse " in sysline or "wdoc parse_file" in sysline :
21+ if is_verbose :
22+ whi ("Replacing 'wdoc parse' by 'wdoc_parse_file'" )
23+ sys .argv [0 ] = str (Path (sys .argv [0 ]).parent / "wdoc_parse_file" )
24+ del sys .argv [1 ]
25+ sysline = " " .join (sys .argv )
26+ cli_parse_file ()
27+ raise SystemExit (0 )
28+
1929 if " --version" in sysline :
2030 print (f"wdoc version: { wdoc .VERSION } " )
2131 raise SystemExit (0 )
@@ -35,15 +45,6 @@ def cli_launcher() -> None:
3545 whi ("No args shown. Use '--help' to display the help." )
3646 raise SystemExit (0 )
3747
38- # turn 'wdoc parse' into 'wdoc_parse_file'
39- if "wdoc parse " in sysline or "wdoc parse_file" in sysline :
40- if is_verbose :
41- whi ("Replacing 'wdoc parse' by 'wdoc_parse_file'" )
42- sys .argv [0 ] = str (Path (sys .argv [0 ]).parent / "wdoc_parse_file" )
43- del sys .argv [1 ]
44- cli_parse_file ()
45- raise SystemExit (0 )
46-
4748 # while we're at it, make it so that
4849 # "wdoc summary" is parsed like "wdoc --task=summary"
4950 if " --task" not in sysline :
You can’t perform that action at this time.
0 commit comments