mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-20 09:56:31 +08:00
Allow underscores to be treated as dashes in debug categories
This commit is contained in:
parent
ea9d1ad82f
commit
0150d505de
|
@ -73,7 +73,10 @@ static void apply_one_wildcard(const wcstring &wc_esc, bool sense) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void activate_flog_categories_by_pattern(const wcstring &wc) {
|
void activate_flog_categories_by_pattern(const wcstring &inwc) {
|
||||||
|
// Normalize underscores to dashes, allowing the user to be sloppy.
|
||||||
|
wcstring wc = inwc;
|
||||||
|
std::replace(wc.begin(), wc.end(), L'_', L'-');
|
||||||
for (const wcstring &s : split_string(wc, L',')) {
|
for (const wcstring &s : split_string(wc, L',')) {
|
||||||
if (string_prefixes_string(s, L"-")) {
|
if (string_prefixes_string(s, L"-")) {
|
||||||
apply_one_wildcard(s.substr(1), false);
|
apply_one_wildcard(s.substr(1), false);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user