diff options
author | 2011-03-19 22:41:16 +0000 | |
---|---|---|
committer | 2011-03-19 22:44:12 +0000 | |
commit | 5d2cd8d3d90f59991a82bececa02ab282d026b00 (patch) | |
tree | 6c067b58e5e6225789131d60e3fcfc87941bbd82 | |
parent | 37c7cba48c7c7d632c32f543af81ce5007b4ab2e (diff) | |
download | paludis-5d2cd8d3d90f59991a82bececa02ab282d026b00.tar.gz paludis-5d2cd8d3d90f59991a82bececa02ab282d026b00.tar.xz |
Don't go splat for script commands
-rw-r--r-- | src/clients/cave/cmd_help.cc | 5 | ||||
-rw-r--r-- | src/clients/cave/cmd_print_commands.cc | 2 | ||||
-rw-r--r-- | src/clients/cave/command.hh | 1 | ||||
-rw-r--r-- | src/clients/cave/script_command.cc | 2 |
4 files changed, 9 insertions, 1 deletions
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<Environment> & env, for (EnumIterator<CommandImportance> 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<Environment> & 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; } |