Updated documentation and command line options based on things I'd like to eventually implement

This commit is contained in:
Hackerpilot 2013-02-22 13:25:22 -08:00
parent 119c6b917d
commit 12369feea7
1 changed files with 21 additions and 8 deletions

29
main.d
View File

@ -97,12 +97,12 @@ int main(string[] args)
{ {
string[] importDirs; string[] importDirs;
bool sloc; bool sloc;
/+bool dotComplete;+/ bool dotComplete;
/+bool json;+/ bool parenComplete;
/+bool parenComplete;+/
bool highlight; bool highlight;
bool ctags; bool ctags;
bool recursiveCtags; bool declaration;
bool recursive;
bool format; bool format;
bool help; bool help;
bool tokenCount; bool tokenCount;
@ -112,8 +112,9 @@ int main(string[] args)
{ {
getopt(args, "I", &importDirs,/+ "dotComplete|d", &dotComplete,+/ "sloc|l", &sloc, getopt(args, "I", &importDirs,/+ "dotComplete|d", &dotComplete,+/ "sloc|l", &sloc,
/+"json|j", &json,+/ /+"parenComplete|p", &parenComplete,+/ "highlight", &highlight, /+"json|j", &json,+/ /+"parenComplete|p", &parenComplete,+/ "highlight", &highlight,
"ctags|c", &ctags, "recursive|r|R", &recursiveCtags, "help|h", &help, "ctags|c", &ctags, "recursive|r|R", &recursive, "help|h", &help,
"tokenCount", &tokenCount, "frequencyCount", &frequencyCount); "tokenCount", &tokenCount, "frequencyCount", &frequencyCount,
"declaration|e", &declaration);
} }
catch (Exception e) catch (Exception e)
{ {
@ -182,6 +183,8 @@ void printHelp(string programName)
` `
Usage: %s options Usage: %s options
options: options:
--help | -h --help | -h
Prints this help message Prints this help message
@ -210,9 +213,16 @@ options:
and methods available in the current scope that begin with the text and methods available in the current scope that begin with the text
before the cursor position. before the cursor position.
--declaration | -e [sourceFile] cursorPosition
Prints the absolute path to the file in which the symbol at the cursor
position was declared, as well as its line number.
--highlight [sourceFile] - Syntax-highlight the given source file. The --highlight [sourceFile] - Syntax-highlight the given source file. The
resulting HTML will be written to standard output. resulting HTML will be written to standard output.
--imports | -i [sourceFiles]
Prints modules imported by the given source file.
-I includePath -I includePath
Include _includePath_ in the list of paths used to search for imports. Include _includePath_ in the list of paths used to search for imports.
By default dscanner will search in the current working directory as By default dscanner will search in the current working directory as
@ -225,7 +235,10 @@ options:
of a filename. of a filename.
--recursive | -R | -r directory --recursive | -R | -r directory
When used with --ctags, dscanner will produce ctags output for all .d When used with --ctags or --highlight, dscanner will produce ctags/html
and .di files contained within directory and its sub-directories.`, output for all .d and .di files contained within directory and its
sub-directories. When used with --imports, dscanner will output all
modules imported by the given file as well as any modules publically
imported by any imported modules.`,
programName); programName);
} }