From 191eee1990dbe1b8e6bfcc98fdef7bde655f2538 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 6 Mar 2019 10:52:31 +0900 Subject: find: add -a NoAssignee support We can find No Assignee task as below, but not useful. find -na "" This patch support -a NoAssignee support for it. It might be replace if schema had required at assignee Signed-off-by: Kuninori Morimoto --- scripts/find.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'scripts/find.py') diff --git a/scripts/find.py b/scripts/find.py index cf25e16..e1e86ae 100755 --- a/scripts/find.py +++ b/scripts/find.py @@ -24,13 +24,19 @@ class find(base.base): def default_arg(self, arg): # return [] for -all # + # replace -a NoAssignee to -na "" + # # add "-ns Done" automatically # if user doesn't specify "-s" or "-ns" match = 0 - for cmd in arg: - if (cmd == "-all"): + for i in range(len(arg)): + if (arg[i] == "-all"): return [] - if ((cmd == "-s") or (cmd == "-ns")): + if ((arg[i] == "-a") and + (arg[i+1] == "NoAssignee")): + arg[i] = "-na" + arg[i+1] = "" + if ((arg[i] == "-s") or (arg[i] == "-ns")): match = 1 if (not match): -- cgit v1.2.3