diff options
author | wm4 <wm4@nowhere> | 2013-11-23 21:35:03 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-23 21:35:03 +0100 |
commit | e99ae17a80c64f5f0b758b6aab999fd7cb406dd3 (patch) | |
tree | a0606b966eea25503b4bb7db0a4ee96c2418e364 /mpvcore/m_config.c | |
parent | b5ed6148394062fbc8ac101bd1efe918470ac585 (diff) | |
download | mpv-e99ae17a80c64f5f0b758b6aab999fd7cb406dd3.tar.bz2 mpv-e99ae17a80c64f5f0b758b6aab999fd7cb406dd3.tar.xz |
options: don't prefix sub-options with "--" in help output
Commit 0cb9227a added this to the option list help output, but it looks
strange with sub-options.
Diffstat (limited to 'mpvcore/m_config.c')
-rw-r--r-- | mpvcore/m_config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mpvcore/m_config.c b/mpvcore/m_config.c index 0e23c899fd..7ada99e068 100644 --- a/mpvcore/m_config.c +++ b/mpvcore/m_config.c @@ -635,6 +635,7 @@ void m_config_print_option_list(const struct m_config *config) { char min[50], max[50]; int count = 0; + const char *prefix = config->is_toplevel ? "--" : ""; mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Options:\n\n"); for (int i = 0; i < config->num_opts; i++) { @@ -644,7 +645,7 @@ void m_config_print_option_list(const struct m_config *config) continue; if (co->is_generated) continue; - mp_msg(MSGT_CFGPARSER, MSGL_INFO, " --%-30.30s", co->name); + mp_msg(MSGT_CFGPARSER, MSGL_INFO, " %s%-30.30s", prefix, co->name); if (opt->type == &m_option_type_choice) { mp_msg(MSGT_CFGPARSER, MSGL_INFO, " Choices:"); struct m_opt_choice_alternatives *alt = opt->priv; |