aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-02-12 15:05:51 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-02-12 15:05:51 +0000
commit74670031ae1f3c4b6073dfef1381732af8f7be41 (patch)
treebae90a0de1b73ac9316567ce0c7bba11600818d2
parent7f5da5c6222c2311500886d61be1ed729078fdf4 (diff)
downloadpaludis-74670031ae1f3c4b6073dfef1381732af8f7be41.tar.gz
paludis-74670031ae1f3c4b6073dfef1381732af8f7be41.tar.xz
Default to --kind all if --repository specified.
-rw-r--r--src/clients/inquisitio/command_line.cc2
-rw-r--r--src/clients/inquisitio/do_search.cc4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/clients/inquisitio/command_line.cc b/src/clients/inquisitio/command_line.cc
index ce260bd..dbea034 100644
--- a/src/clients/inquisitio/command_line.cc
+++ b/src/clients/inquisitio/command_line.cc
@@ -71,7 +71,7 @@ CommandLine::CommandLine() :
paludis::args::EnumArg::EnumArgOptions
("installable", "Installable packages")
("installed", "Installed packages")
- ("all", "All packages"),
+ ("all", "All packages (default if --repository specified)"),
"installable"),
output_args(this, "Output options",
diff --git a/src/clients/inquisitio/do_search.cc b/src/clients/inquisitio/do_search.cc
index f6e743a..d255ebf 100644
--- a/src/clients/inquisitio/do_search.cc
+++ b/src/clients/inquisitio/do_search.cc
@@ -177,6 +177,10 @@ do_search(const Environment & env)
{
using namespace tr1::placeholders;
+ if (CommandLine::get_instance()->a_repository.specified() &&
+ ! CommandLine::get_instance()->a_kind.specified())
+ CommandLine::get_instance()->a_kind.set_argument("all");
+
std::list<tr1::shared_ptr<Matcher> > matchers;
for (CommandLine::ParametersConstIterator p(CommandLine::get_instance()->begin_parameters()),
p_end(CommandLine::get_instance()->end_parameters()) ; p != p_end ; ++p)