// file      : bpkg/rep-remove.cli
// license   : MIT; see accompanying LICENSE file

include <libbpkg/manifest.hxx>;

include <bpkg/configuration.cli>;

"\section=1"
"\name=bpkg-rep-remove"
"\summary=remove repository from configuration"

namespace bpkg
{
  {
    "<options> <rep-name> <rep-loc>",


    "\h|SYNOPSIS|

     \c{\b{bpkg rep-remove}|\b{remove} [<options>] (<rep-name>|<rep-loc>)...\n
        \b{bpkg rep-remove}|\b{remove} [<options>] \b{--all}|\b{-a}\n
        \b{bpkg rep-remove}|\b{remove} [<options>] \b{--clean}}


     \h|DESCRIPTION|

     The \cb{rep-remove} command removes the specified package repositories
     from the configuration. The repository to remove can be specified either
     as a repository name or as a repository location (URL or a directory
     path).

     Alternatively, the \cb{--all|-a} option can be used to remove all the
     repositories that were previously added (\l{bpkg-rep-add(1)}) to the
     configuration.

     Finally, the \cb{--clean} option can be used to revert the repositories
     to the clean state, as if they were added but never fetched."
  }

  class rep_remove_options: configuration_options
  {
    "\h|REP-REMOVE OPTIONS|"

    bool --all|-a
    {
      "Remove all the repositories."
    }

    bool --clean
    {
      "Clean the repository state."
    }
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bpkg-default-options-files(1)} for an overview of the default
   options files. For the \cb{pkg-rep-remove} command the search start
   directory is the configuration directory. The following options files are
   searched for in each directory and, if found, loaded in the order listed:

   \
   bpkg.options
   bpkg-rep-remove.options
   \

   The following \cb{rep-remove} command options cannot be specified in the
   default options files:

   \
   --directory|-d
   \
  "
}
