diff options
Diffstat (limited to 'src/precmd.cc')
-rw-r--r-- | src/precmd.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/precmd.cc b/src/precmd.cc index d6ff1ba5..590d2553 100644 --- a/src/precmd.cc +++ b/src/precmd.cc @@ -226,24 +226,20 @@ value_t args_command(call_scope_t& args) args.value().dump(out); out << std::endl << std::endl; - std::pair<value_t::sequence_t::const_iterator, expr_t> - info = args_to_predicate(begin, end); - begin = info.first; - string predicate = info.second.text(); + std::pair<expr_t, query_parser_t> info = args_to_predicate(begin, end); call_scope_t sub_args(static_cast<scope_t&>(args)); - sub_args.push_back(string_value(predicate)); + sub_args.push_back(string_value(info.first.text())); parse_command(sub_args); - if (begin != end) { + if (info.second.tokens_remaining()) { out << std::endl << _("====== Display predicate ======") << std::endl << std::endl; - predicate = args_to_predicate(begin, end).second.text(); - call_scope_t disp_sub_args(static_cast<scope_t&>(args)); - disp_sub_args.push_back(string_value(predicate)); + disp_sub_args.push_back + (string_value(args_to_predicate(info.second).first.text())); parse_command(disp_sub_args); } |