diff options
author | wm4 <wm4@nowhere> | 2016-12-16 16:09:10 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-12-16 16:09:10 +0100 |
commit | aab98776f602a4bec1a74ee87eb829aadf6437ea (patch) | |
tree | 546340338050917156d3335ff43c52007f18e21c /options | |
parent | a8347eb9ba9e09177da50592fde7f3ae7261ce59 (diff) |
options: change --h=... behavior
Does not match a shell pattern anymore. Instead, a simple sub-string
search is done.
Diffstat (limited to 'options')
-rw-r--r-- | options/m_config.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/options/m_config.c b/options/m_config.c index 2dc3eb569d..14aa56da51 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -29,10 +29,6 @@ #include <stdbool.h> #include <pthread.h> -#if HAVE_FNMATCH -#include <fnmatch.h> -#endif - #include "libmpv/client.h" #include "mpv_talloc.h" @@ -956,10 +952,8 @@ void m_config_print_option_list(const struct m_config *config, const char *name) const struct m_option *opt = co->opt; if (co->is_hidden) continue; -#if HAVE_FNMATCH - if (fnmatch(name, co->name, 0)) + if (strcmp(name, "*") != 0 && !strstr(co->name, name)) continue; -#endif MP_INFO(config, " %s%-30s", prefix, co->name); if (opt->type == &m_option_type_choice) { MP_INFO(config, " Choices:"); |