From aab98776f602a4bec1a74ee87eb829aadf6437ea Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 16 Dec 2016 16:09:10 +0100 Subject: options: change --h=... behavior Does not match a shell pattern anymore. Instead, a simple sub-string search is done. --- options/m_config.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'options') 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 #include -#if HAVE_FNMATCH -#include -#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:"); -- cgit v1.2.3