Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inline docs for --terminal-persistence modes #4076

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions bin/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,19 @@ let term =
[ "debug-artifact-substitution" ]
~docs ~doc:"Print debugging info about artifact substitution")
and+ terminal_persistence =
let modes = Config.Terminal_persistence.all in
let doc =
let f s = fst s |> Printf.sprintf "$(b,%s)" in
Printf.sprintf
{|Changes how the log of build results are displayed to the
console between rebuilds while in $(b,--watch) mode. Supported modes:
%s.|}
(List.map ~f modes |> String.concat ~sep:", ")
in
Arg.(
value
& opt (some (enum Config.Terminal_persistence.all)) None
& info [ "terminal-persistence" ] ~docs ~docv:"MODE"
~doc:
{|
Changes how the log of build results are displayed to the
console between rebuilds while in --watch mode. |})
& opt (some (enum modes)) None
& info [ "terminal-persistence" ] ~docs ~docv:"MODE" ~doc)
and+ display = display_term
and+ no_buffer =
let doc =
Expand Down