mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-31 23:28:45 +00:00
Print warning on failure to match debug category
This commit is contained in:
parent
a7aca37f9b
commit
a0faac400d
1 changed files with 5 additions and 0 deletions
|
@ -88,11 +88,16 @@ using namespace flog_details;
|
||||||
/// For each category, if its name matches the wildcard, set its enabled to the given sense.
|
/// For each category, if its name matches the wildcard, set its enabled to the given sense.
|
||||||
static void apply_one_wildcard(const wcstring &wc_esc, bool sense) {
|
static void apply_one_wildcard(const wcstring &wc_esc, bool sense) {
|
||||||
wcstring wc = parse_util_unescape_wildcards(wc_esc);
|
wcstring wc = parse_util_unescape_wildcards(wc_esc);
|
||||||
|
bool match_found = false;
|
||||||
for (category_t *cat : s_all_categories) {
|
for (category_t *cat : s_all_categories) {
|
||||||
if (wildcard_match(cat->name, wc)) {
|
if (wildcard_match(cat->name, wc)) {
|
||||||
cat->enabled = sense;
|
cat->enabled = sense;
|
||||||
|
match_found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!match_found) {
|
||||||
|
fprintf(stderr, "Failed to match debug category: %ls\n", wc_esc.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void activate_flog_categories_by_pattern(const wcstring &inwc) {
|
void activate_flog_categories_by_pattern(const wcstring &inwc) {
|
||||||
|
|
Loading…
Reference in a new issue