diff options
-rw-r--r-- | compiler/commands.nim | 11 | ||||
-rw-r--r-- | doc/basicopt.txt | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 7274004a9..ec58706f3 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -77,6 +77,14 @@ proc writeAdvancedUsage(pass: TCmdLinePass) = {msgStdout}) msgQuit(0) +proc writeFullhelp(pass: TCmdLinePass) = + if pass == passCmd1: + msgWriteln(`%`(HelpMessage, [VersionAsString, + platform.OS[platform.hostOS].name, + CPU[platform.hostCPU].name]) & Usage & AdvancedUsage, + {msgStdout}) + msgQuit(0) + proc writeVersionInfo(pass: TCmdLinePass) = if pass == passCmd1: msgWriteln(`%`(HelpMessage, [VersionAsString, @@ -611,6 +619,9 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; of "advanced": expectNoArg(switch, arg, pass, info) writeAdvancedUsage(pass) + of "fullhelp": + expectNoArg(switch, arg, pass, info) + writeFullhelp(pass) of "help", "h": expectNoArg(switch, arg, pass, info) helpOnError(pass) diff --git a/doc/basicopt.txt b/doc/basicopt.txt index 4db2d5af7..4c11cc767 100644 --- a/doc/basicopt.txt +++ b/doc/basicopt.txt @@ -36,7 +36,7 @@ Options: --app:console|gui|lib|staticlib generate a console app|GUI app|DLL|static library -r, --run run the compiled program with given arguments - --advanced show advanced command line switches + --fullhelp show all command line switches -h, --help show this help Note, single letter options that take an argument require a colon. E.g. -p:PATH. |