summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
Diffstat (limited to 'options')
-rw-r--r--options/m_option.c3
-rw-r--r--options/m_option.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/options/m_option.c b/options/m_option.c
index e0dc1b9729..e0f3dc5c76 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -1552,6 +1552,9 @@ static int parse_keyvalue_list(struct mp_log *log, const m_option_t *opt,
bool append = false;
bool full_value = false;
+ if ((opt->flags & M_OPT_HAVE_HELP) && bstr_equals0(param, "help"))
+ param = bstr0("help=");
+
if (bstr_endswith0(name, "-add")) {
append = true;
} else if (bstr_endswith0(name, "-append")) {
diff --git a/options/m_option.h b/options/m_option.h
index 2402405cde..60b7700c6d 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -405,6 +405,9 @@ char *format_file_size(int64_t size);
// Do not add as property.
#define M_OPT_NOPROP (1 << 6)
+// Enable special semantics for some options when parsing the string "help".
+#define M_OPT_HAVE_HELP (1 << 7)
+
// The following are also part of the M_OPT_* flags, and are used to update
// certain groups of options.
#define UPDATE_OPT_FIRST (1 << 7)