summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/option.h4
-rw-r--r--src/report.cc2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/option.h b/src/option.h
index a791e250..7deb5f58 100644
--- a/src/option.h
+++ b/src/option.h
@@ -202,6 +202,10 @@ inline bool is_eq(const char * p, const char * n) {
if (is_eq(p, #name)) \
return ((name ## _handler).parent = this, &(name ## _handler))
+#define OPT_ALT(name, alt) \
+ if (is_eq(p, #name) || is_eq(p, #alt)) \
+ return ((name ## _handler).parent = this, &(name ## _handler))
+
#define OPT_(name) \
if (! *(p + 1) || \
((name ## _handler).wants_arg && \
diff --git a/src/report.cc b/src/report.cc
index 6cfd9cd3..917c98f6 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -405,6 +405,7 @@ option_t<report_t> * report_t::lookup_option(const char * p)
case 'f':
OPT(forecast_);
else OPT(format_);
+ else OPT_ALT(head_, first_);
break;
case 'g':
OPT_CH(performance);
@@ -425,6 +426,7 @@ option_t<report_t> * report_t::lookup_option(const char * p)
else OPT(lot_prices);
else OPT(lot_tags);
else OPT(lots);
+ else OPT_ALT(tail_, last_);
break;
case 'm':
OPT(market);