toolcontext: hide some really internal options so they do not appears on --help
authorJean Privat <jean@pryen.org>
Tue, 4 Nov 2014 13:50:28 +0000 (08:50 -0500)
committerJean Privat <jean@pryen.org>
Tue, 4 Nov 2014 16:14:12 +0000 (11:14 -0500)
* --bash-completion
* --stub-man
* --set-dummy-tool
* --no-main

These options are still recognized, bash-completed and in the manpage

Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/abstract_compiler.nit
src/toolcontext.nit

index 9b935ac..0456bf9 100644 (file)
@@ -79,6 +79,8 @@ redef class ToolContext
                self.option_context.add_option(self.opt_no_gcc_directive)
                self.option_context.add_option(self.opt_release)
                self.option_context.add_option(self.opt_max_c_lines, self.opt_group_c_files)
+
+               opt_no_main.hidden = true
        end
 
        redef fun process_options(args)
index f851476..f86d1e2 100644 (file)
@@ -279,6 +279,11 @@ class ToolContext
        init
        do
                option_context.add_option(opt_warn, opt_warning, opt_quiet, opt_stop_on_first_error, opt_no_color, opt_log, opt_log_dir, opt_nit_dir, opt_help, opt_version, opt_set_dummy_tool, opt_verbose, opt_bash_completion, opt_stub_man)
+
+               # Hide some internal options
+               opt_stub_man.hidden = true
+               opt_bash_completion.hidden = true
+               opt_set_dummy_tool.hidden = true
        end
 
        # Name, usage and synopsis of the tool.