Commit ea530fe8 authored by Seblu's avatar Seblu
Browse files

tag glob in tagdisplay

parent 54739920
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ import re
import math
import ConfigParser
import time
import fnmatch

class TagDisplay(object):
    '''Handle tagdisplay stuff'''
@@ -60,8 +61,9 @@ class TagDisplay(object):
        if bool(self.option.get("quotespace", False)):
            if re.search("\s", tagvalue) is not None:
                tagvalue = "'%s'"%re.sub("'", "\'", tagvalue)
        if tagname in self.tagtype and self.tagtype[tagname] in self.types:
            return getattr(self, "type_%s"%self.tagtype[tagname])(tagvalue)
        l = [ x for x in self.tagtype if fnmatch.fnmatch(tagname, x) ]
        if len(l) > 0 and self.tagtype[l[0]] in self.types:
            return getattr(self, "type_%s"%self.tagtype[l[0]])(tagvalue)
        return tagvalue

    def type_lower(self, value):