From: Jean Privat Date: Tue, 4 Nov 2014 13:50:28 +0000 (-0500) Subject: toolcontext: hide some really internal options so they do not appears on --help X-Git-Tag: v0.6.11~58^2~2 X-Git-Url: http://nitlanguage.org toolcontext: hide some really internal options so they do not appears on --help * --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 --- diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index 9b935ac..0456bf9 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -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) diff --git a/src/toolcontext.nit b/src/toolcontext.nit index f851476..f86d1e2 100644 --- a/src/toolcontext.nit +++ b/src/toolcontext.nit @@ -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.