]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit
scripts: improve rendering of synopsis/usage
authorBrian Warner <warner@lothar.com>
Tue, 26 May 2015 18:29:49 +0000 (11:29 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 26 May 2015 18:29:49 +0000 (11:29 -0700)
commit01619844de3d51df3528f0b691962e4b7b865dc5
tree5458493422657df0198e9676033ddc4b8f93fa09
parent5d5fa05a4227ba5429e5e417af17b2447d2c043e
scripts: improve rendering of synopsis/usage

Subcommands "--help" is now rendered as:

```
 tahoe [global-options] COMMAND [options] ARGS
 (use 'tahoe --help' to view global options)
 USAGE (flags/options)
 DESCRIPTION
 DESCRIPTION_UNWRAPPED
```

The new .description and .description_unwrapped fields allow
commands (subclasses of twisted.python.usage.Usage) better control over
how their explanations are rendered: the old .longdesc field was wrapped
unpleasantly.
src/allmydata/scripts/common.py
src/allmydata/scripts/runner.py