diff --git a/twander.py b/twander.py index 1545136..7938c54 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.185 2005/01/29 04:31:54 tundra Exp $" +RCSID = "$Id: twander.py,v 3.186 2005/01/29 04:54:06 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -3079,15 +3079,25 @@ else: - # Iterate over the current directory listing - # saving the indexes of items which match. - # We start at 1 not 0 because the first entry - # ("..") is never considered when doing wildcard - # matching. + # Iterate over the current directory listing saving the + # indexes of items which match. We start at 1 not 0 because + # the first entry ("..") is never considered when doing + # wildcard matching. This routine also observes the + # WILDNOCASE option - if set to True, case is collpased for + # matching purposes. matches = [] + wc = wild + if WILDNOCASE: + wc = wildl + for x in range(1,UI.DirList.size()): - if wild.match(UI.DirList.get(x)): + + matchthis = UI.DirList.get(x) + if WILDNOCASE: + matchthis = matchthis.lower() + + if wc.match(matchthis): matches.append(x) # If anything matched, select it @@ -4983,8 +4993,9 @@ "SYMDIR":SYMDIR, "USETHREADS":USETHREADS, "USEWIN32ALL":USEWIN32ALL, + "WARN":WARN, "WILDNOCASE":WILDNOCASE, - "WARN":WARN} + } UI.OptionsNumeric = {"AFTERWAIT":AFTERWAIT,"DEBUGLEVEL":DEBUGLEVEL, "FSZ":FSZ, "MFSZ":MFSZ, "HFSZ":HFSZ, "HEIGHT":HEIGHT, "MAXMENU":MAXMENU, "MAXMENUBUF":MAXMENUBUF, "MAXNESTING":MAXNESTING,