summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/global.cc7
-rw-r--r--src/report.cc1
-rw-r--r--src/report.h2
-rw-r--r--src/session.cc5
-rw-r--r--src/session.h6
5 files changed, 8 insertions, 13 deletions
diff --git a/src/global.cc b/src/global.cc
index b04b4498..915713bc 100644
--- a/src/global.cc
+++ b/src/global.cc
@@ -169,9 +169,12 @@ void global_scope_t::execute_command(strings_list args, bool at_repl)
// by the caller of this function.
report().output_stream
- .initialize(report().HANDLER(output_) ?
+ .initialize(report().HANDLED(output_) ?
optional<path>(path(report().HANDLER(output_).str())) :
- optional<path>(), session().pager_path);
+ optional<path>(),
+ report().HANDLED(pager_) ?
+ optional<path>(path(report().HANDLER(pager_).str())) :
+ optional<path>());
// Create an argument scope containing the report command's arguments, and
// then invoke the command. The bound scope causes lookups to happen
diff --git a/src/report.cc b/src/report.cc
index 95add7a3..06173550 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -344,6 +344,7 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
else OPT(period_sort_);
else OPT(price);
else OPT(price_db_);
+ else OPT(pager_);
break;
case 'q':
diff --git a/src/report.h b/src/report.h
index 62664ba1..b014d2c7 100644
--- a/src/report.h
+++ b/src/report.h
@@ -188,6 +188,7 @@ public:
COPY_OPT(monthly, other),
COPY_OPT(output_, other),
COPY_OPT(output_date_format_, other),
+ COPY_OPT(pager_, other),
COPY_OPT(period_, other),
COPY_OPT(period_sort_, other),
COPY_OPT(price, other),
@@ -269,6 +270,7 @@ public:
OPTION(report_t, monthly);
OPTION(report_t, output_);
OPTION(report_t, output_date_format_);
+ OPTION(report_t, pager_);
OPTION(report_t, period_);
OPTION(report_t, period_sort_);
OPTION(report_t, price);
diff --git a/src/session.cc b/src/session.cc
index 38f15dc9..423c5e0d 100644
--- a/src/session.cc
+++ b/src/session.cc
@@ -354,11 +354,6 @@ expr_t::ptr_op_t session_t::lookup(const string& name)
return MAKE_FUNCTOR(session_t::option_file_);
break;
- case 'p':
- if (std::strcmp(p, "pager_") == 0)
- return MAKE_FUNCTOR(session_t::option_pager_);
- break;
-
case 't':
if (std::strcmp(p, "trace_") == 0)
return MAKE_FUNCTOR(session_t::option_trace_);
diff --git a/src/session.h b/src/session.h
index adf2f4b7..c66d8b26 100644
--- a/src/session.h
+++ b/src/session.h
@@ -69,7 +69,6 @@ public:
bool saw_data_file_from_command_line;
optional<path> init_file;
optional<path> price_db;
- optional<path> pager_path;
bool next_price_db_from_command_line;
bool saw_price_db_from_command_line;
@@ -230,11 +229,6 @@ See LICENSE file included with the distribution for details and disclaimer.";
data_files.push_back(args[0].as_string());
return true;
}
-
- value_t option_pager_(call_scope_t& args) { // :
- pager_path = args[0].as_string();
- return true;
- }
};
/**