def args_order(p):
    """options to order the listing"""
    g = p.add_argument_group('Ordering')
    x = g.add_mutually_exclusive_group()
    x.add_argument('--sort', metavar='WORD', default='name', choices=[
        'none', 'name', 'time'], help=
        'sort by WORD instead of name: none (-U), time (-t)')
    x.add_argument('-t', dest='sort', action='store_const', const='mtime',
        help='sort by time, newest first')
    x.add_argument('-U', dest='sort', action='store_const', const='none',
        help='do not sort; list entries in database order')
    g.add_argument('-r', '--reverse', action='store_true', help=
        'reverse order while sorting')
