Changed --colors to --color, to match Git
This commit is contained in:
parent
2d56d9bc3a
commit
3e543d187c
3 changed files with 16 additions and 16 deletions
|
|
@ -103,7 +103,7 @@ and causes an immediate reloading of all journal files in the session.
|
|||
.It Fl \-code-as-payee
|
||||
.It Fl \-collapse Pq Fl n
|
||||
.It Fl \-collapse-if-zero
|
||||
.It Fl \-colors
|
||||
.It Fl \-color
|
||||
.It Fl \-columns Ar INT
|
||||
.It Fl \-commodity-as-account
|
||||
(Also \fB\-\-comm\-as\-account\fR).
|
||||
|
|
@ -274,9 +274,9 @@ as a string, applying the proper ANSI escape codes to display it in the given
|
|||
if
|
||||
.Ar bool
|
||||
is true. It typically checks the value of the option
|
||||
.Nm Fl \-colors ,
|
||||
.Nm Fl \-color ,
|
||||
for example:
|
||||
.Dl ansify_if(amount, "blue", options.colors)
|
||||
.Dl ansify_if(amount, "blue", options.color)
|
||||
.It Nm beg_line
|
||||
.It Nm beg_pos
|
||||
.It Nm calculated
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ option_t<report_t> * report_t::lookup_option(const char * p)
|
|||
else OPT(amount_);
|
||||
else OPT(amount_data);
|
||||
else OPT(anon);
|
||||
else OPT_ALT(colors, ansi);
|
||||
else OPT_ALT(color, ansi);
|
||||
else OPT(average);
|
||||
else OPT(account_width_);
|
||||
else OPT(amount_width_);
|
||||
|
|
@ -378,7 +378,7 @@ option_t<report_t> * report_t::lookup_option(const char * p)
|
|||
else OPT_ALT(comm_as_account, commodity_as_account);
|
||||
else OPT(collapse);
|
||||
else OPT(collapse_if_zero);
|
||||
else OPT(colors);
|
||||
else OPT(color);
|
||||
else OPT(columns_);
|
||||
else OPT_ALT(basis, cost);
|
||||
else OPT_(current);
|
||||
|
|
|
|||
22
src/report.h
22
src/report.h
|
|
@ -234,9 +234,9 @@ public:
|
|||
|
||||
OPTION__(report_t, balance_format_, CTOR(report_t, balance_format_) {
|
||||
on("%(ansify_if(print(scrub(display_total), 20), \"red\", "
|
||||
" colors & scrub(display_total) < 0))"
|
||||
" color & scrub(display_total) < 0))"
|
||||
" %(!options.flat ? depth_spacer : \"\")"
|
||||
"%-(ansify_if(partial_account(options.flat), \"blue\", colors))\n");
|
||||
"%-(ansify_if(partial_account(options.flat), \"blue\", color))\n");
|
||||
});
|
||||
|
||||
OPTION(report_t, base);
|
||||
|
|
@ -272,7 +272,7 @@ public:
|
|||
OPTION(report_t, comm_as_payee); // -x
|
||||
OPTION(report_t, code_as_account);
|
||||
OPTION(report_t, comm_as_account);
|
||||
OPTION(report_t, colors);
|
||||
OPTION(report_t, color);
|
||||
|
||||
OPTION_(report_t, collapse, DO() { // -n
|
||||
// Make sure that balance reports are collapsed too, but only apply it
|
||||
|
|
@ -498,26 +498,26 @@ public:
|
|||
});
|
||||
|
||||
OPTION__(report_t, register_format_, CTOR(report_t, register_format_) {
|
||||
on("%(ansify_if(print(date, date_width), \"green\", colors & date > today))"
|
||||
on("%(ansify_if(print(date, date_width), \"green\", color & date > today))"
|
||||
" %(ansify_if(print(truncate(payee, payee_width), payee_width), "
|
||||
" \"bold\", colors & !cleared))"
|
||||
" \"bold\", color & !cleared))"
|
||||
" %(ansify_if(print(truncate(account, account_width, abbrev_len), "
|
||||
" account_width), \"blue\", colors))"
|
||||
" account_width), \"blue\", color))"
|
||||
" %(ansify_if(print(scrub(display_amount), amount_width, "
|
||||
" 3 + date_width + payee_width + account_width + amount_width), "
|
||||
" \"red\", colors & scrub(display_amount) < 0))"
|
||||
" \"red\", color & scrub(display_amount) < 0))"
|
||||
" %(ansify_if(print(scrub(display_total), total_width, "
|
||||
" 4 + date_width + payee_width + account_width + amount_width "
|
||||
" + total_width), \"red\", colors & scrub(display_amount) < 0))\n%/"
|
||||
" + total_width), \"red\", color & scrub(display_amount) < 0))\n%/"
|
||||
"%(print(\" \", 2 + date_width + payee_width))"
|
||||
"%(ansify_if(print(truncate(account, account_width, abbrev_len), "
|
||||
" account_width), \"blue\", colors))"
|
||||
" account_width), \"blue\", color))"
|
||||
" %(ansify_if(print(scrub(display_amount), amount_width, "
|
||||
" 3 + date_width + payee_width + account_width + amount_width), "
|
||||
" \"red\", colors & scrub(display_amount) < 0))"
|
||||
" \"red\", color & scrub(display_amount) < 0))"
|
||||
" %(ansify_if(print(scrub(display_total), total_width, "
|
||||
" 4 + date_width + payee_width + account_width + amount_width "
|
||||
" + total_width), \"red\", colors & scrub(display_amount) < 0))\n");
|
||||
" + total_width), \"red\", color & scrub(display_amount) < 0))\n");
|
||||
});
|
||||
|
||||
OPTION(report_t, related); // -r
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue