Added new --head and --tail options, which control how many *entries*
are displayed in a register report or print report. The UNIX commands "head" and "tail" can be used to control how many transactions are displayed.
This commit is contained in:
parent
873c68b234
commit
65b2181860
2 changed files with 13 additions and 0 deletions
11
config.cc
11
config.cc
|
|
@ -46,6 +46,9 @@ config_t::config_t()
|
|||
#endif
|
||||
pricesdb_format = "P %[%Y/%m/%d %H:%M:%S] %A %t\n";
|
||||
|
||||
head_entries = 0;
|
||||
tail_entries = 0;
|
||||
|
||||
show_collapsed = false;
|
||||
show_subtotal = false;
|
||||
show_totals = false;
|
||||
|
|
@ -714,6 +717,14 @@ OPT_BEGIN(wide, "w") {
|
|||
config.register_format = config.wide_register_format;
|
||||
} OPT_END(wide);
|
||||
|
||||
OPT_BEGIN(head, ":") {
|
||||
config.head_entries = std::atoi(optarg);
|
||||
} OPT_END(head);
|
||||
|
||||
OPT_BEGIN(tail, ":") {
|
||||
config.tail_entries = std::atoi(optarg);
|
||||
} OPT_END(tail);
|
||||
|
||||
OPT_BEGIN(empty, "E") {
|
||||
config.show_empty = true;
|
||||
} OPT_END(empty);
|
||||
|
|
|
|||
2
config.h
2
config.h
|
|
@ -51,6 +51,8 @@ struct config_t
|
|||
std::string reconcile_date;
|
||||
unsigned long budget_flags;
|
||||
unsigned long pricing_leeway;
|
||||
int head_entries;
|
||||
int tail_entries;
|
||||
bool show_collapsed;
|
||||
bool show_subtotal;
|
||||
bool show_totals;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue