summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc
index 9c8ad8ba..34231b5c 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -408,6 +408,14 @@ value_t report_t::reload_command(call_scope_t&)
return true;
}
+value_t report_t::echo_command(call_scope_t& scope)
+{
+ interactive_t args(scope, "s");
+ std::ostream& out(output_stream);
+ out << args.get<string>(0) << std::endl;
+ return true;
+}
+
bool report_t::maybe_import(const string& module)
{
if (lookup(string(OPT_PREFIX) + "import_")) {
@@ -710,6 +718,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
else if (is_eq(q, "emacs"))
return WRAP_FUNCTOR
(reporter<>(new format_emacs_posts(output_stream), *this, "#emacs"));
+ else if (is_eq(q, "echo"))
+ return MAKE_FUNCTOR(report_t::echo_command);
break;
case 'p':