aboutsummaryrefslogtreecommitdiffstats
path: root/becommands
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-27 09:26:52 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-27 09:26:52 -0500
commitadb7e854b56aa7c3df6fae677fe383f417e364c4 (patch)
treea396ad3ba0d175f8a157c2e8ec6a19240b56510e /becommands
parent998525bf43305b1d53927975621ab9f211d0ed95 (diff)
downloadbugseverywhere-adb7e854b56aa7c3df6fae677fe383f417e364c4.tar.gz
Basic bash completion is now supported.
I'm still working on a clean implementation though...
Diffstat (limited to 'becommands')
-rw-r--r--becommands/list.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/becommands/list.py b/becommands/list.py
index 5c0d326..7c51f11 100644
--- a/becommands/list.py
+++ b/becommands/list.py
@@ -32,9 +32,21 @@ def execute(args, test=False):
a:om: Bug A
b:cm: Bug B
"""
- options, args = get_parser().parse_args(args)
+ parser = get_parser()
+ options, args = parser.parse_args(args)
+
+ for option in [o.dest for o in parser.option_list if o.dest != None]:
+ value = getattr(options, option)
+ if value == "--options":
+ if option == "status":
+ raise cmdutil.GetCompletions(status_values)
+ raise cmdutil.GetCompletions()
+ if "--options" in args:
+ raise cmdutil.GetCompletions() # no completions for arguments yet
+
if len(args) > 0:
raise cmdutil.UsageError("Too many arguments.")
+
bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test)
bd.load_all_bugs()
# select status