def _export(subs, shared):
    """Configure the `doorstop export` subparser."""
    info = 'export a document as YAML or another format'
    sub = subs.add_parser('export', description=info.capitalize() + '.',
        help=info, **shared)
    sub.add_argument('prefix', help="prefix of document to export or 'all'")
    sub.add_argument('path', nargs='?', help=
        "path to exported file or directory for 'all'")
    group = sub.add_mutually_exclusive_group()
    group.add_argument('-y', '--yaml', action='store_true', help=
        'output YAML (default when no path)')
    group.add_argument('-c', '--csv', action='store_true', help=
        "output CSV (default for 'all')")
    group.add_argument('-t', '--tsv', action='store_true', help='output TSV')
    group.add_argument('-x', '--xlsx', action='store_true', help='output XLSX')
    sub.add_argument('-w', '--width', type=int, help=
        'limit line width on text output')
