~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/doc_generate/autodoc_man.py

(jelmer) Generate environment variables section in bzr(1) from standard list
 of environment variables. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    outfile.write(man_escape(man_head % params))
57
57
    outfile.write(man_escape(getcommand_list(params)))
58
58
    outfile.write(man_escape(getcommand_help(params)))
 
59
    outfile.write("".join(environment_variables()))
59
60
    outfile.write(man_escape(man_foot % params))
60
61
 
61
62
 
171
172
    return help
172
173
 
173
174
 
 
175
def environment_variables():
 
176
    yield ".SH \"ENVIRONMENT\"\n"
 
177
 
 
178
    from bzrlib.help_topics import known_env_variables
 
179
    for k, desc in known_env_variables:
 
180
        yield ".TP\n"
 
181
        yield ".I \"%s\"\n" % k
 
182
        yield man_escape(desc) + "\n"
 
183
 
 
184
 
174
185
man_preamble = """\
175
186
.\\\"Man page for Bazaar (%(bzrcmd)s)
176
187
.\\\"
215
226
"""
216
227
 
217
228
man_foot = """\
218
 
.SH "ENVIRONMENT"
219
 
.TP
220
 
.I "BZRPATH"
221
 
Path where
222
 
.B "%(bzrcmd)s"
223
 
is to look for shell plugin external commands.
224
 
.TP
225
 
.I "BZR_EMAIL"
226
 
E-Mail address of the user. Overrides default user config.
227
 
.TP
228
 
.I "EMAIL"
229
 
E-Mail address of the user. Overrides default user config.
230
 
.TP
231
 
.I "BZR_EDITOR"
232
 
Editor for editing commit messages
233
 
.TP
234
 
.I "EDITOR"
235
 
Editor for editing commit messages
236
 
.TP
237
 
.I "BZR_PLUGIN_PATH"
238
 
Paths where bzr should look for plugins
239
 
.TP
240
 
.I "BZR_HOME"
241
 
Home directory for bzr
242
229
.SH "FILES"
243
230
.TP
244
231
.I "~/.bazaar/bazaar.conf"