aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/cmdutil.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-03-11 19:17:17 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-03-11 19:17:17 +0000
commitf254781274f35c485befb4f6acedb8fb8d1f797b (patch)
tree81f82e11fce6aa27abf9853cf9e183d40d593cc5 /libbe/cmdutil.py
parent20a48a1ad3f720d915084d6d139b3790cd4630eb (diff)
downloadbugseverywhere-f254781274f35c485befb4f6acedb8fb8d1f797b.tar.gz
Implemented plugin system for viewing commands
Diffstat (limited to 'libbe/cmdutil.py')
-rw-r--r--libbe/cmdutil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py
index 2afd53c..77f0dfb 100644
--- a/libbe/cmdutil.py
+++ b/libbe/cmdutil.py
@@ -1,4 +1,5 @@
import bugdir
+import plugin
def unique_name(bug, bugs):
chars = 1
for some_bug in bugs:
@@ -49,3 +50,11 @@ def bug_summary(bug, bugs):
(unique_name(bug, bugs), bug.severity, target, bug.creator,
bug.summary)
+def iter_commands():
+ return plugin.iter_plugins("becommands")
+
+def execute(cmd, args):
+ return plugin.get_plugin("becommands", cmd).execute(args)
+
+def help(cmd, args):
+ return plugin.get_plugin("becommands", cmd).help()