From 84551c20fe603ee9832b0b17061660cdf31a913e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 27 Nov 2008 11:03:21 -0500 Subject: Added bugid_args option to cmdutil.default_complete. Now most of the bug-id arguments support Bash completion. Since there will hopefully be lots of bugs in the database, I decided to filter the list of available bugs. Currently, we just auto-complete active bugs for most commands, with the exceptions of open (obviously) and status (which needs to work on all types of bugs). --- becommands/target.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'becommands/target.py') diff --git a/becommands/target.py b/becommands/target.py index 497ebf0..d14ff06 100644 --- a/becommands/target.py +++ b/becommands/target.py @@ -34,7 +34,8 @@ def execute(args, test=False): """ parser = get_parser() options, args = parser.parse_args(args) - cmdutil.default_complete(options, args, parser) + cmdutil.default_complete(options, args, parser, + bugid_args={0: lambda bug : bug.active==True}) if len(args) not in (1, 2): raise cmdutil.UsageError bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) -- cgit