From eda75f7ee0de2937f9b24f0d32c5e5b815c6fb86 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 1 Apr 2024 14:56:04 -0700 Subject: [PATCH] doc: document more `dune describe` commands (#10350) Signed-off-by: Antonio Nuno Monteiro --- bin/describe/aliases_targets.ml | 4 +-- bin/describe/package_entries.ml | 2 +- bin/printenv.ml | 2 +- doc/reference/cli.rst | 43 +++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/bin/describe/aliases_targets.ml b/bin/describe/aliases_targets.ml index bb3cf86f1e7..8286bbf06b9 100644 --- a/bin/describe/aliases_targets.ml +++ b/bin/describe/aliases_targets.ml @@ -105,7 +105,7 @@ module Aliases_cmd = struct let term = ls_term fetch_results let command = - let doc = "Print aliases in a given directory. Works similalry to ls." in + let doc = "Print aliases in a given directory. Works similarly to ls." in Cmd.v (Cmd.info "aliases" ~doc ~envs:Common.envs) term ;; end @@ -134,7 +134,7 @@ module Targets_cmd = struct let term = ls_term fetch_results let command = - let doc = "Print targets in a given directory. Works similalry to ls." in + let doc = "Print targets in a given directory. Works similarly to ls." in Cmd.v (Cmd.info "targets" ~doc ~envs:Common.envs) term ;; end diff --git a/bin/describe/package_entries.ml b/bin/describe/package_entries.ml index d153d19f071..f48e3068f9b 100644 --- a/bin/describe/package_entries.ml +++ b/bin/describe/package_entries.ml @@ -20,7 +20,7 @@ let term = ;; let command = - let doc = "prints information about the entries per package" in + let doc = "prints information about the entries per package." in let info = Cmd.info ~doc "package-entries" in Cmd.v info term ;; diff --git a/bin/printenv.ml b/bin/printenv.ml index f499d5b3eb9..d2b18029dbe 100644 --- a/bin/printenv.ml +++ b/bin/printenv.ml @@ -117,7 +117,7 @@ let term = ;; let command = - let doc = "Print the environment of a directory" in + let doc = "Print the environment of a directory." in let man = [ `S "DESCRIPTION" ; `P {|$(b,dune show env DIR) prints the environment of a directory|} diff --git a/doc/reference/cli.rst b/doc/reference/cli.rst index 1932f787e27..4831085e528 100644 --- a/doc/reference/cli.rst +++ b/doc/reference/cli.rst @@ -36,6 +36,49 @@ documentation for each command is available through ``dune COMMAND --help``. Describe the workspace. + .. describe:: dune describe aliases + + Print aliases in a given directory. Works similarly to ls. + + .. describe:: dune describe env + + Print the environment of a directory. + + .. describe:: dune describe external-lib-deps + + Print out the external libraries needed to build the project. It's an + approximated set of libraries. + + .. describe:: dune describe installed-libraries + + Print out the libraries installed on the system. + + .. describe:: dune describe opam-files + + Print information about the opam files that have been discovered. + + .. describe:: dune describe package-entries + + prints information about the entries per package. + + .. describe:: dune describe pp + + Build a given file and print the preprocessed output. + + .. describe:: dune describe rules + + Dump rules. + + .. describe:: dune describe targets + + Print targets in a given directory. Works similarly to ls. + + .. describe:: dune describe workspace + + Print a description of the workspace's structure. If some directories + are provided, then only those directories of the workspace are + considered. + .. describe:: dune diagnostics Fetch and return errors from the current build.