aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-05 14:49:42 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-05 14:49:42 +0000
commit796ae59ba6e45c3e67a56b5741c2fc0890555010 (patch)
tree75c865854e2c3343f80988875e8647cc16a38253
parenta6c3a1e4729b1266db52ddcbbecbadcafef34455 (diff)
downloadpaludis-796ae59ba6e45c3e67a56b5741c2fc0890555010.tar.gz
paludis-796ae59ba6e45c3e67a56b5741c2fc0890555010.tar.xz
inquisitio --search by default
-rw-r--r--src/clients/inquisitio/inquisitio.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/clients/inquisitio/inquisitio.cc b/src/clients/inquisitio/inquisitio.cc
index 30770ac..6aa903b 100644
--- a/src/clients/inquisitio/inquisitio.cc
+++ b/src/clients/inquisitio/inquisitio.cc
@@ -77,7 +77,7 @@ main(int argc, char *argv[])
Log::get_instance()->set_program_name(argv[0]);
/* need an action */
- if (1 != (CommandLine::get_instance()->a_search.specified() +
+ if (1 < (CommandLine::get_instance()->a_search.specified() +
CommandLine::get_instance()->a_version.specified()))
throw args::DoHelp("you should specify exactly one action");
@@ -97,15 +97,10 @@ main(int argc, char *argv[])
DefaultConfig::get_instance()->set_paludis_command(paludis_command);
- if (CommandLine::get_instance()->a_search.specified())
- {
- if (CommandLine::get_instance()->begin_parameters() == CommandLine::get_instance()->end_parameters())
- throw args::DoHelp("search action takes at least one parameter");
-
- return do_search(*DefaultEnvironment::get_instance());
- }
+ if (CommandLine::get_instance()->begin_parameters() == CommandLine::get_instance()->end_parameters())
+ throw args::DoHelp("search action takes at least one parameter");
- throw InternalError(__PRETTY_FUNCTION__, "no action?");
+ return do_search(*DefaultEnvironment::get_instance());
}
catch (const DoVersion &)
{