aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-27 12:43:36 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-27 12:43:36 +0100
commit4b5d72298a7c2e34cb3934b4042b8bb612487240 (patch)
tree6f92d52f58e05725c77e38ccfef0e125d12ad886
parent34733c880e1762a7ef39d8b27f07dc2b8c08c73d (diff)
downloadpaludis-4b5d72298a7c2e34cb3934b4042b8bb612487240.tar.gz
paludis-4b5d72298a7c2e34cb3934b4042b8bb612487240.tar.xz
Use show --description-keys when searching
-rw-r--r--src/clients/cave/cmd_match.cc1
-rw-r--r--src/clients/cave/cmd_search.cc6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 836d13f..1abf074 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -384,6 +384,7 @@ MatchCommand::run_hosted(
std::list<std::string> texts;
+ /* also in cmd_search.cc */
bool default_names_and_descriptions((! match_options.a_name.specified()) &&
(! match_options.a_description.specified()) && (! match_options.a_key.specified()));
diff --git a/src/clients/cave/cmd_search.cc b/src/clients/cave/cmd_search.cc
index 3d5c8b1..8c5d1b1 100644
--- a/src/clients/cave/cmd_search.cc
+++ b/src/clients/cave/cmd_search.cc
@@ -338,6 +338,12 @@ SearchCommand::run(
show_args->push_back(*k);
}
+ /* also in cmd_match.cc */
+ bool default_names_and_descriptions((! cmdline.match_options.a_name.specified()) &&
+ (! cmdline.match_options.a_description.specified()) && (! cmdline.match_options.a_key.specified()));
+ if (default_names_and_descriptions || cmdline.match_options.a_description.specified())
+ show_args->push_back("--description-keys");
+
ShowCommand show_command;
return show_command.run(env, show_args);
}