Skip to content

Commit

Permalink
dustmite: Add --man
Browse files Browse the repository at this point in the history
For consistency with other D tools.

Closes #83.
  • Loading branch information
CyberShadow committed Feb 7, 2024
1 parent 1c54227 commit ab68756
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dustmite.d
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ struct RemoveRule { Regex!char regexp; string shellGlob; bool remove; }

int main(string[] args)
{
bool force, dumpHtml, dumpJson, readJson, showTimes, stripComments, obfuscate, fuzz, keepLength, showHelp, showVersion, noOptimize, inPlace;
bool force, dumpHtml, dumpJson, readJson, showTimes, stripComments, obfuscate, fuzz, keepLength, showHelp, openWiki, showVersion, noOptimize, inPlace;
string coverageDir;
RemoveRule[] removeRules;
string[] splitRules;
Expand Down Expand Up @@ -195,6 +195,7 @@ int main(string[] args)
"i|in-place", &inPlace,
"json", &readJson,
"h|help", &showHelp,
"man", &openWiki,
"V|version", &showVersion,
);
foreach (ref arg; args)
Expand All @@ -214,6 +215,13 @@ int main(string[] args)
return 0;
}

if (openWiki)
{
browse("https://github.com/CyberShadow/DustMite/wiki");
if (args.length == 1)
return 0;
}

if (showHelp || args.length == 1 || args.length>3)
{
stderr.writef(q"EOS
Expand Down Expand Up @@ -259,6 +267,7 @@ EOS");
stderr.write(q"EOS
-h, --help Show this message
Less interesting options:
--man Launch the project wiki web page in a web browser
-V, --version Show program version
--strategy STRAT Set strategy (careful/lookback/pingpong/indepth/inbreadth)
--dump Dump parsed tree to PATH.dump file
Expand Down

0 comments on commit ab68756

Please sign in to comment.