diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-07-08 09:51:29 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-07-08 13:30:37 +0200 |
commit | 5b2cf75f6ea7a5b6ad2a8af14bb1a3570148835f (patch) | |
tree | b0678d4bf1086cdced0fbca78411396dc51573c9 /src/plugins | |
parent | 481e8f197d1e713ed94d1603c0af272fb202a65b (diff) | |
download | weechat-5b2cf75f6ea7a5b6ad2a8af14bb1a3570148835f.zip |
fset: allow long type name in type filter
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/fset/fset-command.c | 3 | ||||
-rw-r--r-- | src/plugins/fset/fset-option.c | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index bd90af332..4f8e6f6f8 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -676,7 +676,8 @@ fset_command_init () " * show all options (no filter)\n" " xxx show only options with \"xxx\" in name\n" " f:xxx show only configuration file \"xxx\"\n" - " t:xxx show only type \"xxx\" (bool/int/str/col/enum)\n" + " t:xxx show only type \"xxx\" (bool/int/str/col/enum " + "or boolean/integer/string/color/enum)\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 2a227c932..f239c579f 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -344,9 +344,14 @@ fset_option_match_filter (struct t_fset_option *fset_option, const char *filter) else if (strncmp (filter, "t:", 2) == 0) { /* filter by type */ - return (weechat_strcasecmp ( - fset_option_type_string_short[fset_option->type], - filter + 2) == 0) ? 1 : 0; + return ( + (weechat_strcasecmp ( + fset_option_type_string_short[fset_option->type], + filter + 2) == 0) + || (weechat_strcasecmp ( + fset_option_type_string[fset_option->type], + filter + 2) == 0)) ? + 1 : 0; } else if (strncmp (filter, "d==", 3) == 0) { |