val envs :
envs describe the
TERM environment variable.
val don't :
?docs:string -> unit -> bool Cmdliner.Term.t
don't ~docs () is a
--no-pager command line option to
unconditionally request not use a pager.
docs is the manual
section where the option is documented.
val find :
?search:B0_std.Fpath.t list ->
don't:bool -> unit -> (B0_std.Cmd.t option, string) Stdlib.result
find ~search ~don't finds a suitable pager. This is (in order):
trueor if the
TERMenvironment variable is
Ok (Some pager)if
pageris a tool invocation parsed from the
PAGERenvironment variable that can be found via
Ok (Some pager)if either
morecan be found (in that order) via
val page_stdout :
B0_std.Cmd.t option -> (unit, string) Stdlib.result
page_stdout pager setups the program so that if
Some cmd, the standard output of the program is redirected to
a spawn of
cmd with the following twists:
LESSis undefined in the current environment it is set to
LESS=FRXfor the spawn of
Pervasive.at_exitfunction is installed that flushes
Unix.stdoutand waits upon the
None this function has no effect.
val page_files :
B0_std.Cmd.t option -> B0_std.Fpath.t list -> (unit, string) Stdlib.result
page_files pager fs uses
pager to page the files
None, each of the
fsfiles is output on stdout in order separated by a file separator character (U+001C).
cmdis run with
fsas arguments. If
fsis empty does nothing.