@@ -12,6 +12,39 @@ module Version =
1212
1313module Options =
1414
15+ let commandText = @"
16+ Supported commands
17+ ==================
18+ quit
19+ - quit the program
20+ declarations "" filename""
21+ - get information about top-level declarations in a file with location
22+ parse "" <filename>"" [sync]
23+ - trigger full background parse request; should be
24+ followed by content of a file (ended with <<EOF>>)
25+ Optional 'sync' is used to force the parse to occur
26+ synchronously for testing purposes. Not intended for
27+ use in production.
28+ completion "" <filename>"" <line> <col> [timeout] [filter=(StartsWith|Contains)]
29+ - trigger completion request for the specified location
30+ optionally filter in the specified manner
31+ helptext <candidate>
32+ - fetch type signature for specified completion candidate
33+ (from last completion request). Only use in JSON mode.
34+ symboluse "" <filename>"" <line> <col> [timeout]
35+ - find all uses of the symbol for the specified location
36+ tooltip "" <filename>"" <line> <col> [timeout]
37+ - get tool tip for the specified location
38+ finddecl "" <filename>"" <line> <col> [timeout]
39+ - find the point of declaration of the symbol at specified location
40+ methods "" <filename>"" <line> <col> [timeout]
41+ - find the method signatures at specified location
42+ project "" <filename>""
43+ - associates the current session with the specified project
44+ compilerlocation
45+ - prints the best guess for the location of fsc and fsi
46+ (or fsharpc and fsharpi on unix)
47+ "
1548 let verbose = ref false
1649 let timeout = ref 10
1750
@@ -37,6 +70,10 @@ module Options =
3770 " vfilter=" , " apply a comma-separated {FILTER} to verbose output" ,
3871 fun v -> Debug.categories := v.Split( ',' ) |> set |> Some
3972
73+ " commands" , " list the commands that this program understands" ,
74+ fun _ -> printfn " %s " commandText
75+ exit 0
76+
4077 " h|?|help" , " display this help!" ,
4178 fun _ -> printfn " %s " Version.string;
4279 p.WriteOptionDescriptions( stdout);
0 commit comments