Skip to content

Commit

Permalink
Add --recurse and --subpath to opam tree
Browse files Browse the repository at this point in the history
Co-authored-by: R. Boujbel <[email protected]>
  • Loading branch information
kit-ty-kate and rjbou authored Aug 8, 2023
1 parent b5261cd commit 482659f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/client/opamCommands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -821,16 +821,14 @@ let tree ?(why=false) cli =
switch to draw the forest"
in
let tree global_options mode filter post dev doc test dev_setup no_constraint
no_switch atoms_or_locals () =
no_switch recurse supbath atoms_or_locals () =
if atoms_or_locals = [] && no_switch then
`Error
(true, "--no-switch can't be used without specifying a name")
else
(apply_global_options cli global_options;
OpamGlobalState.with_ `Lock_none @@ fun gt ->
OpamSwitchState.with_ `Lock_none gt @@ fun st ->
let recurse = false in (* TODO *)
let subpath = None in (* TODO *)
let st, atoms =
OpamAuxCommands.simulate_autopin
st ~recurse ?subpath ~quiet:true
Expand All @@ -849,6 +847,7 @@ let tree ?(why=false) cli =
Term.(const tree $global_options cli $mode $filter
$post cli $dev cli $doc_flag cli $test cli $dev_setup cli
$no_cstr $no_switch
$recurse cli $subpath cli
$atom_or_local_list)

(* SHOW *)
Expand Down

0 comments on commit 482659f

Please sign in to comment.