Moved the --pager option to the session object, rather than the report object.
This commit is contained in:
parent
863b5d8144
commit
7d628d88ff
5 changed files with 12 additions and 9 deletions
|
|
@ -403,8 +403,6 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
|
|||
return MAKE_FUNCTOR(report_t::option_price);
|
||||
else if (std::strcmp(p, "price_db_") == 0)
|
||||
return MAKE_FUNCTOR(report_t::option_price_db_);
|
||||
else if (std::strcmp(p, "pager_") == 0)
|
||||
return MAKE_FUNCTOR(report_t::option_pager_);
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
|
|
|
|||
|
|
@ -151,7 +151,6 @@ public:
|
|||
keep_details_t what_to_keep;
|
||||
|
||||
string account;
|
||||
optional<path> pager_path;
|
||||
|
||||
bool raw_mode;
|
||||
|
||||
|
|
@ -450,11 +449,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
value_t option_pager_(call_scope_t& args) { // :
|
||||
pager_path = args[0].as_string();
|
||||
return true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
value_t option_truncate(call_scope_t& args) { // :
|
||||
std::string style(optarg);
|
||||
|
|
|
|||
|
|
@ -385,6 +385,11 @@ 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_);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ public:
|
|||
optional<path> init_file;
|
||||
optional<path> cache_file;
|
||||
optional<path> price_db;
|
||||
optional<path> pager_path;
|
||||
bool next_price_db_from_command_line;
|
||||
bool saw_price_db_from_command_line;
|
||||
|
||||
|
|
@ -234,6 +235,11 @@ 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;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ void normalize_report_options(report_t& report, const string& verb)
|
|||
|
||||
void create_output_stream(report_t& report)
|
||||
{
|
||||
report.output_stream.initialize(report.output_file, report.pager_path);
|
||||
report.output_stream.initialize(report.output_file, report.session.pager_path);
|
||||
}
|
||||
|
||||
void invoke_command_verb(report_t& report,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue