~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/doc_generate/autodoc_rstx.py

  • Committer: Andrew Bennetts
  • Date: 2007-03-28 07:08:42 UTC
  • mfrom: (2380 +trunk)
  • mto: (2018.5.146 hpss)
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: andrew.bennetts@canonical.com-20070328070842-r843houy668oxb9o
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
    if options:
113
113
        option_str = "\n    Options:\n"
114
114
        for option_name, option in sorted(options.items()):
115
 
            l = '        --' + option_name
116
 
            if option.type is not None:
117
 
                l += ' ' + option.argname.upper()
118
 
            short_name = option.short_name()
119
 
            if short_name:
120
 
                assert len(short_name) == 1
121
 
                l += ', -' + short_name
122
 
            l += (30 - len(l)) * ' ' + option.help
123
 
            # TODO: Split help over multiple lines with
124
 
            # correct indenting and wrapping.
125
 
            wrapped = textwrap.fill(l, initial_indent='',
126
 
                                    subsequent_indent=30*' ')
127
 
            option_str = option_str + wrapped + '\n'
 
115
            for name, short_name, argname, help in option.iter_switches():
 
116
                l = '    --' + name
 
117
                if argname is not None:
 
118
                    l += ' ' + argname
 
119
                if short_name:
 
120
                    assert len(short_name) == 1
 
121
                    l += ', -' + short_name
 
122
                l += (30 - len(l)) * ' ' + (help or '')
 
123
                # TODO: Split help over multiple lines with
 
124
                # correct indenting and wrapping.
 
125
                wrapped = textwrap.fill(l, initial_indent='',
 
126
                                        subsequent_indent=30*' ')
 
127
                option_str = option_str + wrapped + '\n'       
128
128
 
129
129
    aliases_str = ""
130
130
    if cmd.aliases:
188
188
Environment
189
189
===========
190
190
**BZRPATH**
191
 
                Path where **%(bzrcmd)s** is to look for external command.
 
191
                Path where **%(bzrcmd)s** is to look for shell plugin external commands.
192
192
 
193
193
**BZR_EMAIL**
194
194
                E-Mail address of the user. Overrides default user config.
216
216
 
217
217
**On Windows**: ``C:\\Documents and Settings\\username\\Application Data\\bazaar\\2.0\\bazaar.conf``
218
218
 
219
 
Contains the users default configuration. The section ``[DEFAULT]`` is
 
219
Contains the user's default configuration. The section ``[DEFAULT]`` is
220
220
used to define general configuration that will be applied everywhere.
221
221
The section ``[ALIASES]`` can be used to create command aliases for
222
222
commonly used options.