~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: John Arbash Meinel
  • Date: 2009-11-20 16:42:28 UTC
  • mto: This revision was merged to the branch mainline in revision 4819.
  • Revision ID: john@arbash-meinel.com-20091120164228-aa9agsdfomwzqshc
Fix bug #485771. Only change '/' to '/' when expanding globs.

The code we had would replace '/' even if it was in a quoted section,
or if it was part of a simple argument that didn't have a glob.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    shown_commands = [(n, o) for n, o in commands if o.hidden == hidden]
79
79
    max_name = max(len(n) for n, o in shown_commands)
80
80
    indent = ' ' * (max_name + 1)
81
 
    width = osutils.terminal_width()
82
 
    if width is None:
83
 
        width = osutils.default_terminal_width
84
 
    # we need one extra space for terminals that wrap on last char
85
 
    width = width - 1
 
81
    width = osutils.terminal_width() - 1
86
82
 
87
83
    for cmd_name, cmd_object in sorted(shown_commands):
88
84
        plugin_name = cmd_object.plugin_name()