From c41778afc9b9d487e6a45d5030a8bef9a5c318ce Mon Sep 17 00:00:00 2001 From: Thomas Gerigk Date: Mon, 3 Apr 2006 20:16:45 +0200 Subject: added help to 'show'. --- becommands/show.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/becommands/show.py b/becommands/show.py index 9e60586..314cf46 100644 --- a/becommands/show.py +++ b/becommands/show.py @@ -19,9 +19,10 @@ from libbe import bugdir, cmdutil, utility import os def execute(args): - bug_dir = cmdutil.bug_tree() + options, args = get_parser().parse_args(args) if len(args) !=1: raise cmdutil.UserError("Please specify a bug id.") + bug_dir = cmdutil.bug_tree() bug = cmdutil.get_bug(args[0], bug_dir) print cmdutil.bug_summary(bug, list(bug_dir.list())).rstrip("\n") if bug.time is None: @@ -35,3 +36,15 @@ def execute(args): print "From: %s" % comment.From print "Date: %s\n" % utility.time_to_str(comment.date) print comment.body.rstrip('\n') + +def get_parser(): + parser = cmdutil.CmdOptionParser("be show bug-id") + return parser + +longhelp=""" +Show all information about a bug. +""" + +def help(): + return get_parser().help_str() + longhelp + -- cgit