Commit 2280f965 authored by Jan Stolarek's avatar Jan Stolarek Committed by ian@well-typed.com
Browse files

--show-options lists all flags. Add user documentation for #7843

parent a532f40f
......@@ -59,6 +59,12 @@
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;show-options</option></entry>
<entry>display the supported command line options</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;info</option></entry>
<entry>display information about the compiler</entry>
......
......@@ -470,6 +470,18 @@ module X where
</listitem>
</varlistentry>
<varlistentry>
<term>
<cmdsynopsis>
<command>ghc --show-options</command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;show-options</option></primary></indexterm>
</term>
<listitem>
<para>Print the supported command line options. This flag can be used for autocompletion in a shell.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<cmdsynopsis>
......
......@@ -700,7 +700,7 @@ showVersion = putStrLn (cProjectName ++ ", version " ++ cProjectVersion)
showOptions :: IO ()
showOptions = putStr (unlines availableOptions)
where
availableOptions = map ((:) '-') . filter ((>2) . length) $
availableOptions = map ((:) '-') $
getFlagNames mode_flags ++
getFlagNames flagsDynamic ++
(filterUnwantedStatic . getFlagNames $ flagsStatic) ++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment