diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-31 15:33:39 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-31 15:33:39 -0500 |
commit | 2d1562d951e763fed71fe60e77cc9921be9abdc9 (patch) | |
tree | ce242a439dbc6f950853364355f9c8d5d1275095 /libbe/ui | |
parent | aacf928c27da30856a6e15b2ec7778f5707504ea (diff) | |
download | bugseverywhere-2d1562d951e763fed71fe60e77cc9921be9abdc9.tar.gz |
Use fragment in base command completion + command io fixups.
Diffstat (limited to 'libbe/ui')
-rwxr-xr-x | libbe/ui/command_line.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libbe/ui/command_line.py b/libbe/ui/command_line.py index b36d251..1c7399d 100755 --- a/libbe/ui/command_line.py +++ b/libbe/ui/command_line.py @@ -277,24 +277,27 @@ def main(): ui.restrict_file_access = False ui.storage_callbacks = None be = BE(ui=ui) + ui.setup_command(be) + parser = CmdOptionParser(be) try: options,args = parser.parse_args() except CallbackExit: return 0 except libbe.command.UserError, e: - print >> be.stdout, 'ERROR:\n', e + print >> ui.io.stdout, 'ERROR:\n', e return 1 command_name = args.pop(0) try: Class = libbe.command.get_command_class(command_name=command_name) except libbe.command.UnknownCommand, e: - print >> be.stdout, e + print >> ui.io.stdout, e return 1 ui.storage_callbacks = libbe.command.StorageCallbacks(options['repo']) command = Class(ui=ui) + ui.setup_command(command) if command.name in ['comment']: paginate = 'never' |