diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-05 22:26:11 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-25 16:35:28 +0200 |
commit | 1f8fc6ec9b049cd3c6e45c54d72bd0ad905273cf (patch) | |
tree | 2a4d5b031da757733f04006ed8576b1ffe9b7df0 /src/plugins | |
parent | 6ba65da06ef595c08591d45e39da084865fff7a5 (diff) | |
download | weechat-1f8fc6ec9b049cd3c6e45c54d72bd0ad905273cf.zip |
fset: use only short type name in filter "t:xxx"
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/fset/fset-command.c | 3 | ||||
-rw-r--r-- | src/plugins/fset/fset-option.c | 15 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index 97348dd66..95e80ad9e 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -502,8 +502,7 @@ fset_command_init () "formats are:\n" " * show all options (no filter)\n" " f:xxx show only configuration file \"xxx\"\n" - " t:xxx show only type \"xxx\" (beginning of type " - "name is allowed, both English and translated types are allowed)\n" + " t:xxx show only type \"xxx\" (bool/int/str/col)\n" " d show only changed options\n" " d:xxx show only changed options with \"xxx\" in " "name\n" diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index 0fe97c568..20dbb472d 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -225,7 +225,7 @@ fset_option_string_match (const char *string, const char *mask) int fset_option_match_filters (struct t_fset_option *fset_option) { - int length, match; + int match; char *result; if (!weechat_config_boolean (fset_config_look_show_plugin_description) @@ -299,16 +299,9 @@ fset_option_match_filters (struct t_fset_option *fset_option) else if (strncmp (fset_option_filter, "t:", 2) == 0) { /* filter by type */ - length = strlen (fset_option_filter + 2); - return ((length > 0) - && ((weechat_strncasecmp ( - fset_option_type_string[fset_option->type], - fset_option_filter + 2, - length) == 0) - || (weechat_strncasecmp ( - _(fset_option_type_string[fset_option->type]), - fset_option_filter + 2, - length) == 0))) ? 1 : 0; + return (weechat_strcasecmp ( + fset_option_type_string_short[fset_option->type], + fset_option_filter + 2) == 0) ? 1 : 0; } else if (strncmp (fset_option_filter, "d==", 3) == 0) { |