Browse Source

Add extra to `-help` output

gingerBill 5 years ago
parent
commit
19c32ecb81
1 changed files with 18 additions and 0 deletions
  1. 18 0
      src/main.cpp

+ 18 - 0
src/main.cpp

@@ -1039,10 +1039,28 @@ int main(int arg_count, char const **arg_ptr) {
 		print_usage_line(1, "%.*s %.*s [arguments]", LIT(args[0]), LIT(command));
 		print_usage_line(0, "");
 
+		if (command == "build") {
+			print_usage_line(1, "build     compile .odin file, or directory of .odin files, as an executable.");
+			print_usage_line(1, "          one must contain the program's entry point, all must be in the same package.");
+		} else if (command == "run") {
+			print_usage_line(1, "run       same as 'build', but also then runs the newly compiled executable.");
+		} else if (command == "check") {
+			print_usage_line(1, "check     parse and type check .odin file");
+		} else if (command == "query") {
+			print_usage_line(1, "query     parse, type check, and output a .json file containing information about the program");
+		} else if (command == "docs") {
+			print_usage_line(1, "docs      generate documentation for a .odin file");
+		} else if (command == "version") {
+			print_usage_line(1, "version   print version");
+		}
+
 		bool build = command == "build";
 		bool run_or_build = command == "run" || command == "build";
 		bool check = command == "run" || command == "build" || command == "check";
 
+		print_usage_line(0, "");
+		print_usage_line(1, "Flags");
+		print_usage_line(0, "");
 
 		if (run_or_build) {
 			print_usage_line(1, "-out:<filepath>");