The docstring of the SortByOption class (in 7.18.0) alludes to a sort_by_option decorator:
@command
@table_format_option
@sort_by_option(
("Package ID", "package_id"),
("Name", "package_name"),
("Manager", "manager_id"),
("Version", None),
)
@pass_context
def my_cmd(ctx):
ctx.print_table(header_defs, rows)
but it doesn't seem to exist. Could this be added so that the sort option could be grouped with other options or be part of constraints?
The docstring of the
SortByOptionclass (in 7.18.0) alludes to asort_by_optiondecorator:but it doesn't seem to exist. Could this be added so that the sort option could be grouped with other options or be part of constraints?