···561561 are intercepted and their stack trace is written to the [err]
562562 formatter}
563563 {- [help] is the formatter used to print help, version messages
564564- or completions, (defaults to {!Format.std_formatter})}
564564+ or completions, (defaults to {!Format.std_formatter}). Note
565565+ that the completion protocol needs to output ['\n'] line ending,
566566+ if you are outputing to a channel make sure it is in binary
567567+ mode to avoid newline translation (this is done automatically
568568+ before completion when [help] is {!Format.std_formatter}).}
565569 {- [err] is the formatter used to print error messages
566570 (defaults to {!Format.err_formatter}).}} *)
567571
+2
src/cmdliner_completion.ml
···133133 | Opt_name ->
134134 `Directives (add_options_group ~err_ppf ~subst eval comp dirs)
135135 in
136136+ if out_ppf == Format.std_formatter
137137+ then set_binary_mode_out stdout true;
136138 match res with
137139 | `Raw raw -> Cmdliner_base.Fmt.pf out_ppf "%s@?" raw
138140 | `Directives dirs -> Cmdliner_base.Fmt.pf out_ppf "%a@?" pp_protocol dirs