diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/find.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/find.py b/scripts/find.py index e0f6558..d5060cd 100755 --- a/scripts/find.py +++ b/scripts/find.py @@ -47,7 +47,7 @@ class find(base.base): #-------------------- # parse_option #-------------------- - def parse_option(self, arg, option, char, hit): + def parse_option(self, arg, option, tag, hit): op = "-l" # hit if (not hit): @@ -58,13 +58,17 @@ class find(base.base): if (cmd == option): match = 1 elif (match): - # Wolfram,Shimoda - # -> - # (Wolfram|Shimoda) - tgt = "({})".format(cmd.replace(",", "|")) - - self.files = self.run("echo \"{}\" | xargs egrep {} \"{}:\s+{}\"".\ - format(self.files, op, char, tgt)) + if (option == "-b"): + tag = cmd + tgt = "" + else: + # Wolfram,Shimoda + # -> + # (Wolfram|Shimoda) + tgt = "\s+({})".format(cmd.replace(",", "|")) + + self.files = self.run("echo \"{}\" | xargs egrep {} \"{}:{}\"".\ + format(self.files, op, tag, tgt)) return #-------------------- @@ -118,6 +122,7 @@ class find(base.base): # -na : not matched assignee # -t : matched team # -nt : not matched team + # -b : bsp if (self.files): self.parse_option(arg, "-s", "status", 1) self.parse_option(arg, "-ns", "status", 0) @@ -125,6 +130,7 @@ class find(base.base): self.parse_option(arg, "-na", "assignee", 0) self.parse_option(arg, "-t", "team", 1) self.parse_option(arg, "-nt", "team", 0) + self.parse_option(arg, "-b", None, 1) #-------------------- # get |