diff --git a/bin/main.ml b/bin/main.ml index ba47da9fe45..61ca4904449 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -38,6 +38,7 @@ let all : _ Cmdliner.Cmd.t list = ; Init.group ; Promotion.group ; Pkg.group + ; Pkg.Alias.group ] in terms @ groups diff --git a/bin/pkg/pkg.ml b/bin/pkg/pkg.ml index cac399c3777..d2e7c538ea8 100644 --- a/bin/pkg/pkg.ml +++ b/bin/pkg/pkg.ml @@ -1,22 +1,23 @@ open Import -let info = - let doc = "Experimental package management" in - let man = - [ `S "DESCRIPTION" - ; `P {|Commands for doing package management with dune|} - ; `Blocks Common.help_secs - ] - in - Cmd.info "pkg" ~doc ~man +let man = + [ `S "DESCRIPTION" + ; `P {|Commands for OCaml package management|} + ; `Blocks Common.help_secs + ] +;; + +let subcommands = + [ Lock.command; Print_solver_env.command; Outdated.command; Validate_lock_dir.command ] ;; -let group = - Cmd.group - info - [ Lock.command - ; Print_solver_env.command - ; Outdated.command - ; Validate_lock_dir.command - ] +let info name = + let doc = "Experimental package management" in + Cmd.info name ~doc ~man ;; + +let group = Cmd.group (info "pkg") subcommands + +module Alias = struct + let group = Cmd.group (info "package") subcommands +end diff --git a/bin/pkg/pkg.mli b/bin/pkg/pkg.mli index d4c5902fcd6..4614acfae93 100644 --- a/bin/pkg/pkg.mli +++ b/bin/pkg/pkg.mli @@ -1,3 +1,7 @@ open Import val group : unit Cmd.t + +module Alias : sig + val group : unit Cmd.t +end diff --git a/doc/dune.inc b/doc/dune.inc index c745d7171c9..ecaa3843715 100644 --- a/doc/dune.inc +++ b/doc/dune.inc @@ -188,6 +188,15 @@ (package dune) (files dune-ocaml-merlin.1)) +(rule + (with-stdout-to dune-package.1 + (run dune package --help=groff))) + +(install + (section man) + (package dune) + (files dune-package.1)) + (rule (with-stdout-to dune-pkg.1 (run dune pkg --help=groff)))