diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index c03f148cc..3236a33b6 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -287,7 +287,7 @@ fset_command_init () " * show all options (no filter)\n" " f:xxx show only configuration file \"xxx\"\n" " s:xxx show only section \"xxx\"\n" - " d: show only changed options\n" + " d show only changed options\n" " d:xxx show only changed options with \"xxx\" in name\n" " d=xxx show only changed options with \"xxx\" in value\n" " d==xxx show only changed options with exact value \"xxx\"\n" diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index d09e84e06..62aad7266 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -243,12 +243,13 @@ fset_option_match_filters (const char *config_name, const char *section_name, /* filter by modified values */ if (!fset_option_value_different_from_default (fset_option)) return 0; - if (fset_option_filter[2] - && !fset_option_string_match (fset_option->name, fset_option_filter + 2)) - { - return 0; - } - return 1; + return fset_option_string_match (fset_option->name, + fset_option_filter + 2) ? 1 : 0; + } + else if (strcmp (fset_option_filter, "d") == 0) + { + /* filter by modified values */ + return (fset_option_value_different_from_default (fset_option)) ? 1 : 0; } else if (strncmp (fset_option_filter, "==", 2) == 0) {