aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 22:41:16 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 22:44:12 +0000
commit5d2cd8d3d90f59991a82bececa02ab282d026b00 (patch)
tree6c067b58e5e6225789131d60e3fcfc87941bbd82
parent37c7cba48c7c7d632c32f543af81ce5007b4ab2e (diff)
downloadpaludis-5d2cd8d3d90f59991a82bececa02ab282d026b00.tar.gz
paludis-5d2cd8d3d90f59991a82bececa02ab282d026b00.tar.xz
Don't go splat for script commands
-rw-r--r--src/clients/cave/cmd_help.cc5
-rw-r--r--src/clients/cave/cmd_print_commands.cc2
-rw-r--r--src/clients/cave/command.hh1
-rw-r--r--src/clients/cave/script_command.cc2
4 files changed, 9 insertions, 1 deletions
diff --git a/src/clients/cave/cmd_help.cc b/src/clients/cave/cmd_help.cc
index c242289..71cfb1a 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 98de969..f32c0c5 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 4217144..81d24f3 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 1990b25..e09411c 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;
}