Skip to content

Commit cf0423d

Browse files
Alizterrgrinberg
authored andcommitted
feature: create dune show command group
This is an alias of dune describe. Signed-off-by: Ali Caglayan <[email protected]>
1 parent 158f31d commit cf0423d

File tree

5 files changed

+26
-7
lines changed

5 files changed

+26
-7
lines changed

bin/describe/describe.ml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ open Import
77
88
- duniverse people for "describe opam-files" *)
99

10+
let subcommands =
11+
[ Describe_workspace.command
12+
; Describe_external_lib_deps.command
13+
; Describe_opam_files.command
14+
; Describe_pp.command
15+
]
16+
17+
let make_group info =
18+
let default = Describe_workspace.term in
19+
Cmd.group ~default info subcommands
20+
1021
let group =
1122
let doc = "Describe the workspace." in
1223
let man =
@@ -26,10 +37,4 @@ let group =
2637
]
2738
in
2839
let info = Cmd.info "describe" ~doc ~man in
29-
let default = Describe_workspace.term in
30-
Cmd.group ~default info
31-
[ Describe_workspace.command
32-
; Describe_external_lib_deps.command
33-
; Describe_opam_files.command
34-
; Describe_pp.command
35-
]
40+
make_group info

bin/describe/describe.mli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
open Import
22

3+
val make_group : Cmd.info -> unit Cmd.t
4+
5+
(** Command group for dune describe *)
36
val group : unit Cmd.t

bin/main.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ let all : _ Cmdliner.Cmd.t list =
3232
[ Ocaml_cmd.group
3333
; Coq.group
3434
; Describe.group
35+
; Show.group
3536
; Rpc.group
3637
; Internal.group
3738
; Init.group

bin/show.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
open Import
2+
3+
let group =
4+
let doc = "Command group for showing information about the workspace" in
5+
let info = Cmd.info ~doc "show" in
6+
Describe.make_group info

bin/show.mli

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
open Import
2+
3+
(** Command group for dune show (alias of describe) *)
4+
val group : unit Cmd.t

0 commit comments

Comments
 (0)