From 5d2cd8d3d90f59991a82bececa02ab282d026b00 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Sat, 19 Mar 2011 22:41:16 +0000 Subject: Don't go splat for script commands --- src/clients/cave/cmd_help.cc | 5 +++++ src/clients/cave/cmd_print_commands.cc | 2 ++ src/clients/cave/command.hh | 1 + src/clients/cave/script_command.cc | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/clients/cave/cmd_help.cc b/src/clients/cave/cmd_help.cc index c24228956..71cfb1aa9 100644 --- a/src/clients/cave/cmd_help.cc +++ b/src/clients/cave/cmd_help.cc @@ -94,6 +94,10 @@ HelpCommand::run(const std::shared_ptr & env, for (EnumIterator e, e_end(cmdline.a_all.specified() ? last_ci : CommandImportance(ci_supplemental + 1)) ; e != e_end ; ++e) + { + if (*e == ci_ignore) + continue; + for (CommandFactory::ConstIterator cmd(CommandFactory::get_instance()->begin()), cmd_end(CommandFactory::get_instance()->end()) ; cmd != cmd_end ; ++cmd) { @@ -103,6 +107,7 @@ HelpCommand::run(const std::shared_ptr & env, cout << " " << (*e == ci_core ? c::bold_blue().colour_string() : "") << std::left << std::setw(30) << *cmd << c::normal().colour_string() << " " << instance->make_doc_cmdline()->app_synopsis() << std::endl; } + } return EXIT_SUCCESS; } diff --git a/src/clients/cave/cmd_print_commands.cc b/src/clients/cave/cmd_print_commands.cc index 98de969ac..f32c0c590 100644 --- a/src/clients/cave/cmd_print_commands.cc +++ b/src/clients/cave/cmd_print_commands.cc @@ -92,6 +92,8 @@ PrintCommandsCommand::run( if (! cmdline.a_all.specified() && ! instance->importance() == ci_core) continue; + if (instance->importance() == ci_ignore) + continue; cout << stringify(*cmd) << endl; } diff --git a/src/clients/cave/command.hh b/src/clients/cave/command.hh index 42171447f..81d24f3da 100644 --- a/src/clients/cave/command.hh +++ b/src/clients/cave/command.hh @@ -36,6 +36,7 @@ namespace paludis ci_development, ci_scripting, ci_internal, + ci_ignore, last_ci }; diff --git a/src/clients/cave/script_command.cc b/src/clients/cave/script_command.cc index 1990b25ae..e09411ca6 100644 --- a/src/clients/cave/script_command.cc +++ b/src/clients/cave/script_command.cc @@ -87,6 +87,6 @@ ScriptCommand::make_doc_cmdline() CommandImportance ScriptCommand::importance() const { - return ci_supplemental; + return ci_ignore; } -- cgit v1.2.3