#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# Copyright (C) 2012-2019 British Crown (Met Office) & Contributors.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Rose is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Rose. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# NAME
#     rosie ls
#
# SYNOPSIS
#     rosie ls [OPTIONS]
#
# DESCRIPTION
#     List the local suites.
#
#     Search for locally checked out suites and print their details.
#
#     The default format includes a local working copy status field (`%local`)
#     in the first column.
#     A blank field means there is no related suite checked out.
#
#     * `=` means that the suite is checked out at this branch and revision.
#     * `<` means that the suite is checked out but at an older revision.
#     * `>` means that the suite is checked out but at a newer revision.
#     * `S` means that the suite is checked out but on a different branch.
#     * `M` means that the suite is checked out and modified.
#     * `X` means that the suite is checked out but is corrupted.
#
# OPTIONS
#     --prefix=PREFIX
#         Display locally checked out suites from only the specified web
#         services. This option can be used multiple times.
#     --no-headers, -H
#         Do not print column headers.
#     --print-format=FORMAT, --format=FORMAT, -f FORMAT
#         Control the output format of the results using a string
#         containing column names or properties preceded by `%`.
#         For example: `rosie ls --format="%idx from %owner"`
#         might give: `abc01 from daisy`
#     --quiet, -q
#         Shorthand for `--format="%idx"`.
#     --reverse, -r
#         Reverse sort order.
#     --sort=FIELD, -s FIELD
#         Sort results by the field `FIELD` instead of revision.
#     --user=~USERNAME, -u ~USERNAME
#         Specify another user whose roses directory you want to list
#         e.g. `--user=~bob`
#     --verbose, -v
#         Display full info for each returned suite.
#-------------------------------------------------------------------------------
exec python2 -m rosie.ws_client_cli list_local_suites "$@"
