|
50 | 50 | Start the development server, serving pages from the target branch. |
51 | 51 | """ |
52 | 52 |
|
53 | | -dump_completion_desc = """ |
54 | | -Print shell-completion functions. |
| 53 | +generate_completion_desc = """ |
| 54 | +Generate shell-completion functions for bfg9000 and write them to standard |
| 55 | +output. This requires the Python package `shtab`. |
55 | 56 | """ |
56 | 57 |
|
57 | 58 |
|
@@ -216,7 +217,7 @@ def help(parser, args): |
216 | 217 | parser.parse_args(args.subcommand + ['--help']) |
217 | 218 |
|
218 | 219 |
|
219 | | -def dump_completion(parser, args): |
| 220 | +def generate_completion(parser, args): |
220 | 221 | try: |
221 | 222 | import shtab |
222 | 223 | print(shtab.complete(parser, shell=args.shell)) |
@@ -330,10 +331,10 @@ def main(): |
330 | 331 | help='subcommand to request help for') |
331 | 332 |
|
332 | 333 | completion_p = subparsers.add_parser( |
333 | | - 'dump-completion', description=dump_completion_desc, |
| 334 | + 'generate-completion', description=generate_completion_desc, |
334 | 335 | help='print shell completion script' |
335 | 336 | ) |
336 | | - completion_p.set_defaults(func=dump_completion) |
| 337 | + completion_p.set_defaults(func=generate_completion) |
337 | 338 | shell = (os.path.basename(os.environ['SHELL']) |
338 | 339 | if 'SHELL' in os.environ else None) |
339 | 340 | completion_p.add_argument('-s', '--shell', metavar='SHELL', default=shell, |
|
0 commit comments