package console

Build not yet checked
  1. Overview
  2. Docs
Colours, tables, trees and progress rows for the terminal

Install

dune-project
 Dependency

Authors

Maintainers

Sources

console-0.10.1.tbz
sha256=37ad65f6833c65814b0673f009f6b656c5194608ca03519da2e63e1051d54f6e
sha512=7677067f1a3244779cdbc5c90a8b0e1eba30c3fd58281584ea3d4c46c3e219eef0668588ca0e2938799c61a3fa831ce2146eac73717214d7baf96b497bfcd892

doc/src/console.cli/console_cli.ml.html

Source file console_cli.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(*---------------------------------------------------------------------------
  Copyright (c) 2026 Thomas Gazagnaire. All rights reserved.
  SPDX-License-Identifier: ISC
  ---------------------------------------------------------------------------*)

let theme ~docs =
  let doc =
    Fmt.str "The look of the output: %s."
      (Cmdliner.Arg.doc_alts_enum Console.Theme.all)
  in
  Cmdliner.Arg.(
    value
    & opt (some (enum Console.Theme.all)) None
    & info [ "theme" ] ~docs ~docv:"NAME" ~doc)

let setup ?(docs = Cmdliner.Manpage.s_common_options) () =
  let setup style_renderer theme =
    Console_tty.setup ?style_renderer ?theme ()
  in
  Cmdliner.Term.(const setup $ Fmt_cli.style_renderer ~docs () $ theme ~docs)