From 9b905f2b44dc3c379c20eeec5ba4c9ecb4331577 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 19 Jun 2010 14:02:33 -0400 Subject: [PATCH] query command's parsing behavior sensitive to -n With -n, the first argument is parsed as a string containing subarguments. Otherwise, each argument is parsed as a separate argument. In short, the -n mode mimicks what happens when the query expr after "=" is parsed for automated expressions. The non -n mode mimicks what happens at the command line for users. --- src/precmd.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/precmd.cc b/src/precmd.cc index 95f3e875..38860766 100644 --- a/src/precmd.cc +++ b/src/precmd.cc @@ -200,7 +200,8 @@ value_t query_command(call_scope_t& args) args.value().dump(out); out << std::endl << std::endl; - query_t query(args.value(), report.what_to_keep()); + query_t query(args.value(), report.what_to_keep(), + ! report.HANDLED(collapse)); if (query) { call_scope_t sub_args(static_cast(args)); sub_args.push_back(string_value(query.text()));