aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/command/util.py')
-rw-r--r--libbe/command/util.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/libbe/command/util.py b/libbe/command/util.py
index c9618ad..977b596 100644
--- a/libbe/command/util.py
+++ b/libbe/command/util.py
@@ -34,12 +34,8 @@ def complete_command(command, argument, fragment=None):
"""
return list(libbe.command.commands())
-def complete_path(command, argument, fragment=None):
- """
- List possible path completions for fragment.
-
- command argument is not used.
- """
+def comp_path(fragment=None):
+ """List possible path completions for fragment."""
if fragment == None:
fragment = '.'
comps = glob.glob(fragment+'*') + glob.glob(fragment+'/*')
@@ -47,6 +43,10 @@ def complete_path(command, argument, fragment=None):
comps.extend(glob.glob(comps[0]+'/*'))
return comps
+def complete_path(command, argument, fragment=None):
+ """List possible path completions for fragment."""
+ return comp_path(fragment)
+
def complete_status(command, argument, fragment=None):
bd = command._get_bugdir()
import libbe.bug
@@ -57,10 +57,13 @@ def complete_severity(command, argument, fragment=None):
import libbe.bug
return libbe.bug.severity_values
+def assignees(bugdir):
+ bugdir.load_all_bugs()
+ return list(set([bug.assigned for bug in bugdir
+ if bug.assigned != None]))
+
def complete_assigned(command, argument, fragment=None):
- if fragment == None:
- return []
- return [fragment]
+ return assignees(command._get_bugdir())
def complete_extra_strings(command, argument, fragment=None):
if fragment == None: