package b0
Software construction and deployment kit
Install
Dune Dependency
Authors
Maintainers
Sources
b0-0.0.2.tbz
sha512=78fd9e53b84cf5d6bf497adaf4b6d7d974134044318639cdfe5e01c7faaa8d987d04769abe3b3b1cbdb937132e21d8723dc185cd3c68433a793278907a8e757e
doc/b0_b00_kit/B00_pager/index.html
Module B00_pager
Pager interaction.
Environment variables
module Env : sig ... end
Environment variables.
envs ()
describe the PAGER
and TERM
environment variable for cmdliner.
Paging
val find :
?win_exe:bool ->
?search:B00_std.Fpath.t list ->
don't:bool ->
unit ->
(B00_std.Cmd.t option, string) Stdlib.result
find ~search ~don't
finds a suitable pager. This is (in order):
Ok None
ifdon't
istrue
or if theTERM
environment variable isdumb
or undefined.Ok (Some pager)
ifpager
is a tool invocation parsed from thePAGER
environment variable that can be found viaOs.Cmd.find_tool ?win_exe ?search
.Ok (Some pager)
if eitherless
ormore
can be found (in that order) viaOs.Cmd.find_tool ?win_exe ?search
.Ok None
otherwise.
val page_stdout : B00_std.Cmd.t option -> (unit, string) Stdlib.result
page_stdout pager
setups the program so that if pager
is Some cmd
, the standard output of the program is redirected to a spawn of cmd
with the following twists:
- If the environment variable
LESS
is undefined in the current environment it is set toLESS=FRX
for the spawn ofcmd
. - A
Pervasive.at_exit
function is installed that flushesFmt.stdout
andstdout
, closesUnix.stdout
and waits upon thecmd
spawn termination.
If pager
is None
this function has no effect.
val page_files :
B00_std.Cmd.t option ->
B00_std.Fpath.t list ->
(unit, string) Stdlib.result
page_files pager fs
uses pager
to page the files fs
. If pager
is:
None
, each of thefs
files is output on stdout in order separated by a file separator character (U+001C).Some cmd
,cmd
is run withfs
as arguments. Iffs
is empty does nothing.
Cli interaction
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page