mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Adopt rusty parse_util_unescape_wildcards
This commit is contained in:
parent
12afb320a3
commit
c25cc8df5d
2 changed files with 4 additions and 5 deletions
|
@ -59,8 +59,6 @@ include_cpp! {
|
|||
generate!("log_extra_to_flog_file")
|
||||
|
||||
generate!("indent_visitor_t")
|
||||
generate!("parse_util_unescape_wildcards")
|
||||
|
||||
generate!("fish_wcwidth")
|
||||
generate!("fish_wcswidth")
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use crate::ffi::{get_flog_file_fd, parse_util_unescape_wildcards, wildcard_match};
|
||||
use crate::ffi::{get_flog_file_fd, wildcard_match};
|
||||
use crate::parse_util::parse_util_unescape_wildcards;
|
||||
use crate::wchar::{widestrs, wstr, WString};
|
||||
use crate::wchar_ffi::WCharToFFI;
|
||||
use std::io::Write;
|
||||
|
@ -208,10 +209,10 @@ pub(crate) use {should_flog, FLOG, FLOGF};
|
|||
|
||||
/// For each category, if its name matches the wildcard, set its enabled to the given sense.
|
||||
fn apply_one_wildcard(wc_esc: &wstr, sense: bool) {
|
||||
let wc = parse_util_unescape_wildcards(&wc_esc.to_ffi());
|
||||
let wc = parse_util_unescape_wildcards(wc_esc);
|
||||
let mut match_found = false;
|
||||
for cat in categories::all_categories() {
|
||||
if wildcard_match(&cat.name.to_ffi(), &wc, false) {
|
||||
if wildcard_match(&cat.name.to_ffi(), &wc.to_ffi(), false) {
|
||||
cat.enabled.store(sense, Ordering::Relaxed);
|
||||
match_found = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue