Use winglob.fnmatch instead of python fnmatch.

This commit is contained in:
voussoir 2020-01-28 17:43:47 -08:00
parent 1d953cc1ed
commit 6d17ed725f

View file

@ -1,5 +1,4 @@
import argparse import argparse
import fnmatch
import itertools import itertools
import os import os
import re import re
@ -16,6 +15,7 @@ from voussoirkit import expressionmatch
from voussoirkit import pathclass from voussoirkit import pathclass
from voussoirkit import safeprint from voussoirkit import safeprint
from voussoirkit import spinal from voussoirkit import spinal
from voussoirkit import winglob
# Thanks georg # Thanks georg
# http://stackoverflow.com/a/13443424 # http://stackoverflow.com/a/13443424
@ -133,7 +133,7 @@ def search(
return ( return (
(term in line) or (term in line) or
(do_regex and re.search(term, line)) or (do_regex and re.search(term, line)) or
(do_glob and fnmatch.fnmatch(line, term)) (do_glob and winglob.fnmatch(line, term))
) )
if do_expression: if do_expression: